>From 9a57b2392951aa8761495ef469214f174510292c Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Tue, 28 Sep 2010 02:09:51 +0200
Subject: [PATCH] Fix some double newlines
Just a couple that woud now print double (or several more) newlines.
Signed-off-by: Tamas TEVESZ <[email protected]>
---
WINGs/wcolorpanel.c | 4 +-
WPrefs.app/MouseSettings.c | 2 +-
WPrefs.app/WPrefs.c | 4 +-
WPrefs.app/xmodifier.c | 63 +++++++++++++++++++++----------------------
src/dock.c | 2 +-
src/main.c | 3 +-
src/startup.c | 12 ++++----
src/superfluous.c | 2 +-
src/window.c | 4 +-
src/xmodifier.c | 63 +++++++++++++++++++++----------------------
util/wmsetbg.c | 18 ++++++------
11 files changed, 87 insertions(+), 90 deletions(-)
diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c
index 91545dd..ee419aa 100644
--- a/WINGs/wcolorpanel.c
+++ b/WINGs/wcolorpanel.c
@@ -3031,7 +3031,7 @@ static void customPaletteMenuRename(W_ColorPanel * panel)
}
if (rename(fromPath, toPath) != 0)
- werror(_("Couldn't rename palette %s to %s\n"),
fromName, toName);
+ werror(_("Couldn't rename palette %s to %s"), fromName,
toName);
else {
WMRemovePopUpButtonItem(panel->customPaletteHistoryBtn,
item);
WMInsertPopUpButtonItem(panel->customPaletteHistoryBtn,
item, toName);
@@ -3078,7 +3078,7 @@ static void customPaletteMenuRemove(W_ColorPanel * panel)
WMRemovePopUpButtonItem(panel->customPaletteHistoryBtn,
item);
} else {
- werror(_("Couldn't remove palette %s\n"), tmp);
+ werror(_("Couldn't remove palette %s"), tmp);
}
wfree(tmp);
diff --git a/WPrefs.app/MouseSettings.c b/WPrefs.app/MouseSettings.c
index ff1a5d1..c9fdf55 100644
--- a/WPrefs.app/MouseSettings.c
+++ b/WPrefs.app/MouseSettings.c
@@ -704,7 +704,7 @@ static void storeCommandInScript(char *cmd, char *line)
fclose(fo);
if (rename(tmppath, path) != 0) {
- werror(_("could not rename file %s to %s\n"), tmppath,
path);
+ werror(_("could not rename file %s to %s"), tmppath,
path);
}
wfree(tmppath);
}
diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c
index 4ab7412..c4b48bb 100644
--- a/WPrefs.app/WPrefs.c
+++ b/WPrefs.app/WPrefs.c
@@ -387,7 +387,7 @@ char *LocateImage(char *name)
}
wfree(tmp);
if (!path) {
- wwarning(_("could not locate image file %s\n"), name);
+ wwarning(_("could not locate image file %s"), name);
}
return path;
@@ -962,7 +962,7 @@ int GetSpeedForKey(char *defaultName)
else if (strcasecmp(str, "ultrafast") == 0)
i = 4;
else {
- wwarning(_("bad speed value for option %s\n. Using default
Medium"), defaultName);
+ wwarning(_("bad speed value for option %s; using default
Medium"), defaultName);
i = 2;
}
return i;
diff --git a/WPrefs.app/xmodifier.c b/WPrefs.app/xmodifier.c
index aed6f2c..5304c81 100644
--- a/WPrefs.app/xmodifier.c
+++ b/WPrefs.app/xmodifier.c
@@ -120,42 +120,42 @@ static void x_reset_modifier_mapping(Display * display)
int mode_bit = 0;
XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display);
-#define modwarn(name,old,other)
\
- wwarning ("%s (0x%x) generates %s, which is generated by %s.\n\n", \
- name, code, index_to_name (old), other), \
+#define modwarn(name,old,other)
\
+ wwarning ("%s (0x%x) generates %s, which is generated by %s.",
\
+ name, code, index_to_name (old), other),
\
warned_about_overlapping_modifiers = 1
-#define modbarf(name,other) \
- wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
- name, code, other), \
+#define modbarf(name,other)
\
+ wwarning ("%s (0x%x) generates %s, which is nonsensical.",
\
+ name, code, other),
\
warned_about_predefined_modifiers = 1
-#define check_modifier(name,mask) \
- if ((1<<modifier_index) != mask) \
- wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
- name, code, index_to_name (modifier_index)), \
+#define check_modifier(name,mask)
\
+ if ((1<<modifier_index) != mask)
\
+ wwarning ("%s (0x%x) generates %s, which is nonsensical.",
\
+ name, code, index_to_name (modifier_index)),
\
warned_about_predefined_modifiers = 1
-#define store_modifier(name,old) \
- if (old && old != modifier_index) \
- wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.\n\n",\
- name, code, index_to_name (old), \
- index_to_name (modifier_index)), \
- warned_about_duplicate_modifiers = 1; \
- if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
- else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
- else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
- else if (sym == XK_Mode_switch) \
- mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
- else if (modifier_index == meta_bit && old != meta_bit) \
- modwarn (name, meta_bit, "Meta"); \
- else if (modifier_index == super_bit && old != super_bit) \
- modwarn (name, super_bit, "Super");
\
- else if (modifier_index == hyper_bit && old != hyper_bit) \
- modwarn (name, hyper_bit, "Hyper");
\
- else if (modifier_index == alt_bit && old != alt_bit)
\
- modwarn (name, alt_bit, "Alt"); \
- else
\
+#define store_modifier(name,old)
\
+ if (old && old != modifier_index)
\
+ wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.",
\
+ name, code, index_to_name (old),
\
+ index_to_name (modifier_index)),
\
+ warned_about_duplicate_modifiers = 1;
\
+ if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift");
\
+ else if (modifier_index == LockMapIndex) modbarf (name,"ModLock");
\
+ else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl");
\
+ else if (sym == XK_Mode_switch)
\
+ mode_bit = modifier_index; /* Mode_switch is special, see below... */
\
+ else if (modifier_index == meta_bit && old != meta_bit)
\
+ modwarn (name, meta_bit, "Meta");
\
+ else if (modifier_index == super_bit && old != super_bit)
\
+ modwarn (name, super_bit, "Super");
\
+ else if (modifier_index == hyper_bit && old != hyper_bit)
\
+ modwarn (name, hyper_bit, "Hyper");
\
+ else if (modifier_index == alt_bit && old != alt_bit)
\
+ modwarn (name, alt_bit, "Alt");
\
+ else
\
old = modifier_index;
mkpm = x_modifier_keymap->max_keypermod;
@@ -252,8 +252,7 @@ static void x_reset_modifier_mapping(Display * display)
else if (mode_bit == alt_bit)
warn = "Alt", alt_bit = 0;
if (warn) {
- wwarning
- ("%s is being used for both Mode_switch and
%s.\n\n",
+ wwarning("%s is being used for both Mode_switch and
%s.",
index_to_name(mode_bit), warn),
warned_about_overlapping_modifiers = 1;
}
}
diff --git a/src/dock.c b/src/dock.c
index 3df2759..980203c 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -865,7 +865,7 @@ static void launchDockedApplication(WAppIcon * btn, Bool
withSelection)
dockIconPaint(btn);
}
} else {
- wwarning(_("could not launch application %s\n"),
btn->command);
+ wwarning(_("could not launch application %s"),
btn->command);
btn->launching = 0;
if (!btn->relaunching) {
btn->running = 0;
diff --git a/src/main.c b/src/main.c
index 7ed77a7..8353d28 100644
--- a/src/main.c
+++ b/src/main.c
@@ -494,8 +494,7 @@ static void inotifyWatchConfig()
*/
inotifyWD = inotify_add_watch(inotifyFD, watchPath,
IN_ALL_EVENTS);
if (inotifyWD < 0) {
- wwarning(_("could not add an inotify watch on path\n."
- "%s\n"
+ wwarning(_("could not add an inotify watch on path %s."
"Changes to the defaults database will
require"
" a restart to take effect."), watchPath);
close(inotifyFD);
diff --git a/src/startup.c b/src/startup.c
index 87fa6af..5494284 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -175,7 +175,7 @@ static int catchXError(Display * dpy, XErrorEvent * error)
return 0;
}
FormatXError(dpy, error, buffer, MAXLINE);
- wwarning(_("internal X error: %s\n"), buffer);
+ wwarning(_("internal X error: %s"), buffer);
return -1;
}
@@ -228,13 +228,13 @@ static RETSIGTYPE handleExitSig(int sig)
sigprocmask(SIG_BLOCK, &sigs, NULL);
if (sig == SIGUSR1) {
- wwarning("got signal %i - restarting\n", sig);
+ wwarning("got signal %i - restarting", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_RESTART);
} else if (sig == SIGUSR2) {
- wwarning("got signal %i - rereading defaults\n", sig);
+ wwarning("got signal %i - rereading defaults", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_REREAD);
} else if (sig == SIGTERM || sig == SIGINT || sig == SIGHUP) {
- wwarning("got signal %i - exiting...\n", sig);
+ wwarning("got signal %i - exiting...", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_EXIT);
}
@@ -255,7 +255,7 @@ static void dummyHandler(int sig)
*/
static RETSIGTYPE handleSig(int sig)
{
- wfatal("got signal %i\n", sig);
+ wfatal("got signal %i", sig);
/* Setting the signal behaviour back to default and then reraising the
* signal is a cleaner way to make program exit and core dump than
calling
@@ -676,7 +676,7 @@ void StartUp(Bool defaultScreenOnly)
/* check sanity of some values */
if (wPreferences.icon_size < 16) {
- wwarning(_("icon size is configured to %i, but it's too small.
Using 16, instead\n"),
+ wwarning(_("icon size is configured to %i, but it's too small.
Using 16 instead"),
wPreferences.icon_size);
wPreferences.icon_size = 16;
}
diff --git a/src/superfluous.c b/src/superfluous.c
index 18fe27e..e9b1e66 100644
--- a/src/superfluous.c
+++ b/src/superfluous.c
@@ -385,7 +385,7 @@ static int bounceDirection(WAppIcon *aicon)
break;
default:
- wwarning(_("Impossible direction: %d\n"), dir);
+ wwarning(_("Impossible direction: %d"), dir);
dir = 3;
break;
}
diff --git a/src/window.c b/src/window.c
index f9441aa..a54c0ce 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2726,7 +2726,7 @@ static void resizebarMouseDown(WCoreWindow *sender, void
*data, XEvent *event)
#ifndef NUMLOCK_HACK
if ((event->xbutton.state & ValidModMask)
!= (event->xbutton.state & ~LockMask)) {
- wwarning(_("the NumLock, ScrollLock or similar key seems to be
turned on.\n"
+ wwarning(_("The NumLock, ScrollLock or similar key seems to be
turned on. "
"Turn it off or some mouse actions and keyboard
shortcuts will not work."));
}
#endif
@@ -2884,7 +2884,7 @@ static void titlebarMouseDown(WCoreWindow *sender, void
*data, XEvent *event)
#ifndef NUMLOCK_HACK
if ((event->xbutton.state & ValidModMask)
!= (event->xbutton.state & ~LockMask)) {
- wwarning(_("the NumLock, ScrollLock or similar key seems to be
turned on.\n"
+ wwarning(_("The NumLock, ScrollLock or similar key seems to be
turned on. "
"Turn it off or some mouse actions and keyboard
shortcuts will not work."));
}
#endif
diff --git a/src/xmodifier.c b/src/xmodifier.c
index c6d3e45..a292087 100644
--- a/src/xmodifier.c
+++ b/src/xmodifier.c
@@ -121,42 +121,42 @@ static void x_reset_modifier_mapping(Display * display)
int mode_bit = 0;
XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display);
-#define modwarn(name,old,other)
\
- wwarning ("%s (0x%x) generates %s, which is generated by %s.\n\n", \
- name, code, index_to_name (old), other), \
+#define modwarn(name,old,other)
\
+ wwarning ("%s (0x%x) generates %s, which is generated by %s.",
\
+ name, code, index_to_name (old), other),
\
warned_about_overlapping_modifiers = 1
-#define modbarf(name,other) \
- wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
- name, code, other), \
+#define modbarf(name,other)
\
+ wwarning ("%s (0x%x) generates %s, which is nonsensical.",
\
+ name, code, other),
\
warned_about_predefined_modifiers = 1
-#define check_modifier(name,mask) \
- if ((1<<modifier_index) != mask) \
- wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
- name, code, index_to_name (modifier_index)), \
+#define check_modifier(name,mask)
\
+ if ((1<<modifier_index) != mask)
\
+ wwarning ("%s (0x%x) generates %s, which is nonsensical.",
\
+ name, code, index_to_name (modifier_index)),
\
warned_about_predefined_modifiers = 1
-#define store_modifier(name,old) \
- if (old && old != modifier_index) \
- wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.\n\n",\
- name, code, index_to_name (old), \
- index_to_name (modifier_index)), \
- warned_about_duplicate_modifiers = 1; \
- if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
- else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
- else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
- else if (sym == XK_Mode_switch) \
- mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
- else if (modifier_index == meta_bit && old != meta_bit) \
- modwarn (name, meta_bit, "Meta"); \
- else if (modifier_index == super_bit && old != super_bit) \
- modwarn (name, super_bit, "Super");
\
- else if (modifier_index == hyper_bit && old != hyper_bit) \
- modwarn (name, hyper_bit, "Hyper");
\
- else if (modifier_index == alt_bit && old != alt_bit)
\
- modwarn (name, alt_bit, "Alt"); \
- else
\
+#define store_modifier(name,old)
\
+ if (old && old != modifier_index)
\
+ wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.",
\
+ name, code, index_to_name (old),
\
+ index_to_name (modifier_index)),
\
+ warned_about_duplicate_modifiers = 1;
\
+ if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift");
\
+ else if (modifier_index == LockMapIndex) modbarf (name,"ModLock");
\
+ else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl");
\
+ else if (sym == XK_Mode_switch)
\
+ mode_bit = modifier_index; /* Mode_switch is special, see below... */
\
+ else if (modifier_index == meta_bit && old != meta_bit)
\
+ modwarn (name, meta_bit, "Meta");
\
+ else if (modifier_index == super_bit && old != super_bit)
\
+ modwarn (name, super_bit, "Super");
\
+ else if (modifier_index == hyper_bit && old != hyper_bit)
\
+ modwarn (name, hyper_bit, "Hyper");
\
+ else if (modifier_index == alt_bit && old != alt_bit)
\
+ modwarn (name, alt_bit, "Alt");
\
+ else
\
old = modifier_index;
mkpm = x_modifier_keymap->max_keypermod;
@@ -253,8 +253,7 @@ static void x_reset_modifier_mapping(Display * display)
else if (mode_bit == alt_bit)
warn = "Alt", alt_bit = 0;
if (warn) {
- wwarning
- ("%s is being used for both Mode_switch and
%s.\n\n",
+ wwarning("%s is being used for both Mode_switch and
%s.",
index_to_name(mode_bit), warn),
warned_about_overlapping_modifiers = 1;
}
}
diff --git a/util/wmsetbg.c b/util/wmsetbg.c
index f12c26b..33ea447 100644
--- a/util/wmsetbg.c
+++ b/util/wmsetbg.c
@@ -492,7 +492,7 @@ BackgroundTexture *parseTexture(RContext * rc, char *text)
GETSTRORGOTO(val, tmp, 2, error);
if (!XParseColor(dpy, DefaultColormap(dpy, scr), tmp, &color)) {
- wwarning("could not parse color %s in texture %s\n",
tmp, text);
+ wwarning("could not parse color %s in texture %s", tmp,
text);
RReleaseImage(image);
goto error;
}
@@ -913,7 +913,7 @@ void helperLoop(RContext * rc)
buf[4] = 0;
workspace = atoi(buf);
if (workspace < 0 || workspace >= WORKSPACE_COUNT) {
- wwarning("received message with invalid
workspace number %i\n", workspace);
+ wwarning("received message with invalid
workspace number %i", workspace);
continue;
}
}
@@ -1216,7 +1216,7 @@ int main(int argc, char **argv)
} else if (strcmp(argv[i], "-display") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i -
1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
display = argv[i];
@@ -1246,38 +1246,38 @@ int main(int argc, char **argv)
update++;
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i -
1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
domain = wstrdup(argv[i]);
} else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i],
"--colors") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i -
1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
if (sscanf(argv[i], "%i", &cpc) != 1) {
- wfatal("bad value for colors per channel:
\"%s\"\n", argv[i]);
+ wfatal("bad value for colors per channel:
\"%s\"", argv[i]);
exit(1);
}
} else if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i],
"--back-color") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i -
1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
back_color = argv[i];
} else if (strcmp(argv[i], "-p") == 0 || strcmp(argv[i],
"--parse") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i -
1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
texture = argv[i];
} else if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i],
"--workspace") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i -
1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
if (sscanf(argv[i], "%i", &workspace) != 1) {
--
1.7.0.4
--
[-]
mkdir /nonexistentFrom 9a57b2392951aa8761495ef469214f174510292c Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Tue, 28 Sep 2010 02:09:51 +0200
Subject: [PATCH] Fix some double newlines
Just a couple that woud now print double (or several more) newlines.
Signed-off-by: Tamas TEVESZ <[email protected]>
---
WINGs/wcolorpanel.c | 4 +-
WPrefs.app/MouseSettings.c | 2 +-
WPrefs.app/WPrefs.c | 4 +-
WPrefs.app/xmodifier.c | 63 +++++++++++++++++++++----------------------
src/dock.c | 2 +-
src/main.c | 3 +-
src/startup.c | 12 ++++----
src/superfluous.c | 2 +-
src/window.c | 4 +-
src/xmodifier.c | 63 +++++++++++++++++++++----------------------
util/wmsetbg.c | 18 ++++++------
11 files changed, 87 insertions(+), 90 deletions(-)
diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c
index 91545dd..ee419aa 100644
--- a/WINGs/wcolorpanel.c
+++ b/WINGs/wcolorpanel.c
@@ -3031,7 +3031,7 @@ static void customPaletteMenuRename(W_ColorPanel * panel)
}
if (rename(fromPath, toPath) != 0)
- werror(_("Couldn't rename palette %s to %s\n"), fromName, toName);
+ werror(_("Couldn't rename palette %s to %s"), fromName, toName);
else {
WMRemovePopUpButtonItem(panel->customPaletteHistoryBtn, item);
WMInsertPopUpButtonItem(panel->customPaletteHistoryBtn, item, toName);
@@ -3078,7 +3078,7 @@ static void customPaletteMenuRemove(W_ColorPanel * panel)
WMRemovePopUpButtonItem(panel->customPaletteHistoryBtn, item);
} else {
- werror(_("Couldn't remove palette %s\n"), tmp);
+ werror(_("Couldn't remove palette %s"), tmp);
}
wfree(tmp);
diff --git a/WPrefs.app/MouseSettings.c b/WPrefs.app/MouseSettings.c
index ff1a5d1..c9fdf55 100644
--- a/WPrefs.app/MouseSettings.c
+++ b/WPrefs.app/MouseSettings.c
@@ -704,7 +704,7 @@ static void storeCommandInScript(char *cmd, char *line)
fclose(fo);
if (rename(tmppath, path) != 0) {
- werror(_("could not rename file %s to %s\n"), tmppath, path);
+ werror(_("could not rename file %s to %s"), tmppath, path);
}
wfree(tmppath);
}
diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c
index 4ab7412..c4b48bb 100644
--- a/WPrefs.app/WPrefs.c
+++ b/WPrefs.app/WPrefs.c
@@ -387,7 +387,7 @@ char *LocateImage(char *name)
}
wfree(tmp);
if (!path) {
- wwarning(_("could not locate image file %s\n"), name);
+ wwarning(_("could not locate image file %s"), name);
}
return path;
@@ -962,7 +962,7 @@ int GetSpeedForKey(char *defaultName)
else if (strcasecmp(str, "ultrafast") == 0)
i = 4;
else {
- wwarning(_("bad speed value for option %s\n. Using default Medium"), defaultName);
+ wwarning(_("bad speed value for option %s; using default Medium"), defaultName);
i = 2;
}
return i;
diff --git a/WPrefs.app/xmodifier.c b/WPrefs.app/xmodifier.c
index aed6f2c..5304c81 100644
--- a/WPrefs.app/xmodifier.c
+++ b/WPrefs.app/xmodifier.c
@@ -120,42 +120,42 @@ static void x_reset_modifier_mapping(Display * display)
int mode_bit = 0;
XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display);
-#define modwarn(name,old,other) \
- wwarning ("%s (0x%x) generates %s, which is generated by %s.\n\n", \
- name, code, index_to_name (old), other), \
+#define modwarn(name,old,other) \
+ wwarning ("%s (0x%x) generates %s, which is generated by %s.", \
+ name, code, index_to_name (old), other), \
warned_about_overlapping_modifiers = 1
-#define modbarf(name,other) \
- wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
- name, code, other), \
+#define modbarf(name,other) \
+ wwarning ("%s (0x%x) generates %s, which is nonsensical.", \
+ name, code, other), \
warned_about_predefined_modifiers = 1
-#define check_modifier(name,mask) \
- if ((1<<modifier_index) != mask) \
- wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
- name, code, index_to_name (modifier_index)), \
+#define check_modifier(name,mask) \
+ if ((1<<modifier_index) != mask) \
+ wwarning ("%s (0x%x) generates %s, which is nonsensical.", \
+ name, code, index_to_name (modifier_index)), \
warned_about_predefined_modifiers = 1
-#define store_modifier(name,old) \
- if (old && old != modifier_index) \
- wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.\n\n",\
- name, code, index_to_name (old), \
- index_to_name (modifier_index)), \
- warned_about_duplicate_modifiers = 1; \
- if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
- else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
- else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
- else if (sym == XK_Mode_switch) \
- mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
- else if (modifier_index == meta_bit && old != meta_bit) \
- modwarn (name, meta_bit, "Meta"); \
- else if (modifier_index == super_bit && old != super_bit) \
- modwarn (name, super_bit, "Super"); \
- else if (modifier_index == hyper_bit && old != hyper_bit) \
- modwarn (name, hyper_bit, "Hyper"); \
- else if (modifier_index == alt_bit && old != alt_bit) \
- modwarn (name, alt_bit, "Alt"); \
- else \
+#define store_modifier(name,old) \
+ if (old && old != modifier_index) \
+ wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.", \
+ name, code, index_to_name (old), \
+ index_to_name (modifier_index)), \
+ warned_about_duplicate_modifiers = 1; \
+ if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
+ else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
+ else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
+ else if (sym == XK_Mode_switch) \
+ mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
+ else if (modifier_index == meta_bit && old != meta_bit) \
+ modwarn (name, meta_bit, "Meta"); \
+ else if (modifier_index == super_bit && old != super_bit) \
+ modwarn (name, super_bit, "Super"); \
+ else if (modifier_index == hyper_bit && old != hyper_bit) \
+ modwarn (name, hyper_bit, "Hyper"); \
+ else if (modifier_index == alt_bit && old != alt_bit) \
+ modwarn (name, alt_bit, "Alt"); \
+ else \
old = modifier_index;
mkpm = x_modifier_keymap->max_keypermod;
@@ -252,8 +252,7 @@ static void x_reset_modifier_mapping(Display * display)
else if (mode_bit == alt_bit)
warn = "Alt", alt_bit = 0;
if (warn) {
- wwarning
- ("%s is being used for both Mode_switch and %s.\n\n",
+ wwarning("%s is being used for both Mode_switch and %s.",
index_to_name(mode_bit), warn), warned_about_overlapping_modifiers = 1;
}
}
diff --git a/src/dock.c b/src/dock.c
index 3df2759..980203c 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -865,7 +865,7 @@ static void launchDockedApplication(WAppIcon * btn, Bool withSelection)
dockIconPaint(btn);
}
} else {
- wwarning(_("could not launch application %s\n"), btn->command);
+ wwarning(_("could not launch application %s"), btn->command);
btn->launching = 0;
if (!btn->relaunching) {
btn->running = 0;
diff --git a/src/main.c b/src/main.c
index 7ed77a7..8353d28 100644
--- a/src/main.c
+++ b/src/main.c
@@ -494,8 +494,7 @@ static void inotifyWatchConfig()
*/
inotifyWD = inotify_add_watch(inotifyFD, watchPath, IN_ALL_EVENTS);
if (inotifyWD < 0) {
- wwarning(_("could not add an inotify watch on path\n."
- "%s\n"
+ wwarning(_("could not add an inotify watch on path %s."
"Changes to the defaults database will require"
" a restart to take effect."), watchPath);
close(inotifyFD);
diff --git a/src/startup.c b/src/startup.c
index 87fa6af..5494284 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -175,7 +175,7 @@ static int catchXError(Display * dpy, XErrorEvent * error)
return 0;
}
FormatXError(dpy, error, buffer, MAXLINE);
- wwarning(_("internal X error: %s\n"), buffer);
+ wwarning(_("internal X error: %s"), buffer);
return -1;
}
@@ -228,13 +228,13 @@ static RETSIGTYPE handleExitSig(int sig)
sigprocmask(SIG_BLOCK, &sigs, NULL);
if (sig == SIGUSR1) {
- wwarning("got signal %i - restarting\n", sig);
+ wwarning("got signal %i - restarting", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_RESTART);
} else if (sig == SIGUSR2) {
- wwarning("got signal %i - rereading defaults\n", sig);
+ wwarning("got signal %i - rereading defaults", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_REREAD);
} else if (sig == SIGTERM || sig == SIGINT || sig == SIGHUP) {
- wwarning("got signal %i - exiting...\n", sig);
+ wwarning("got signal %i - exiting...", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_EXIT);
}
@@ -255,7 +255,7 @@ static void dummyHandler(int sig)
*/
static RETSIGTYPE handleSig(int sig)
{
- wfatal("got signal %i\n", sig);
+ wfatal("got signal %i", sig);
/* Setting the signal behaviour back to default and then reraising the
* signal is a cleaner way to make program exit and core dump than calling
@@ -676,7 +676,7 @@ void StartUp(Bool defaultScreenOnly)
/* check sanity of some values */
if (wPreferences.icon_size < 16) {
- wwarning(_("icon size is configured to %i, but it's too small. Using 16, instead\n"),
+ wwarning(_("icon size is configured to %i, but it's too small. Using 16 instead"),
wPreferences.icon_size);
wPreferences.icon_size = 16;
}
diff --git a/src/superfluous.c b/src/superfluous.c
index 18fe27e..e9b1e66 100644
--- a/src/superfluous.c
+++ b/src/superfluous.c
@@ -385,7 +385,7 @@ static int bounceDirection(WAppIcon *aicon)
break;
default:
- wwarning(_("Impossible direction: %d\n"), dir);
+ wwarning(_("Impossible direction: %d"), dir);
dir = 3;
break;
}
diff --git a/src/window.c b/src/window.c
index f9441aa..a54c0ce 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2726,7 +2726,7 @@ static void resizebarMouseDown(WCoreWindow *sender, void *data, XEvent *event)
#ifndef NUMLOCK_HACK
if ((event->xbutton.state & ValidModMask)
!= (event->xbutton.state & ~LockMask)) {
- wwarning(_("the NumLock, ScrollLock or similar key seems to be turned on.\n"
+ wwarning(_("The NumLock, ScrollLock or similar key seems to be turned on. "
"Turn it off or some mouse actions and keyboard shortcuts will not work."));
}
#endif
@@ -2884,7 +2884,7 @@ static void titlebarMouseDown(WCoreWindow *sender, void *data, XEvent *event)
#ifndef NUMLOCK_HACK
if ((event->xbutton.state & ValidModMask)
!= (event->xbutton.state & ~LockMask)) {
- wwarning(_("the NumLock, ScrollLock or similar key seems to be turned on.\n"
+ wwarning(_("The NumLock, ScrollLock or similar key seems to be turned on. "
"Turn it off or some mouse actions and keyboard shortcuts will not work."));
}
#endif
diff --git a/src/xmodifier.c b/src/xmodifier.c
index c6d3e45..a292087 100644
--- a/src/xmodifier.c
+++ b/src/xmodifier.c
@@ -121,42 +121,42 @@ static void x_reset_modifier_mapping(Display * display)
int mode_bit = 0;
XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display);
-#define modwarn(name,old,other) \
- wwarning ("%s (0x%x) generates %s, which is generated by %s.\n\n", \
- name, code, index_to_name (old), other), \
+#define modwarn(name,old,other) \
+ wwarning ("%s (0x%x) generates %s, which is generated by %s.", \
+ name, code, index_to_name (old), other), \
warned_about_overlapping_modifiers = 1
-#define modbarf(name,other) \
- wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
- name, code, other), \
+#define modbarf(name,other) \
+ wwarning ("%s (0x%x) generates %s, which is nonsensical.", \
+ name, code, other), \
warned_about_predefined_modifiers = 1
-#define check_modifier(name,mask) \
- if ((1<<modifier_index) != mask) \
- wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
- name, code, index_to_name (modifier_index)), \
+#define check_modifier(name,mask) \
+ if ((1<<modifier_index) != mask) \
+ wwarning ("%s (0x%x) generates %s, which is nonsensical.", \
+ name, code, index_to_name (modifier_index)), \
warned_about_predefined_modifiers = 1
-#define store_modifier(name,old) \
- if (old && old != modifier_index) \
- wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.\n\n",\
- name, code, index_to_name (old), \
- index_to_name (modifier_index)), \
- warned_about_duplicate_modifiers = 1; \
- if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
- else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
- else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
- else if (sym == XK_Mode_switch) \
- mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
- else if (modifier_index == meta_bit && old != meta_bit) \
- modwarn (name, meta_bit, "Meta"); \
- else if (modifier_index == super_bit && old != super_bit) \
- modwarn (name, super_bit, "Super"); \
- else if (modifier_index == hyper_bit && old != hyper_bit) \
- modwarn (name, hyper_bit, "Hyper"); \
- else if (modifier_index == alt_bit && old != alt_bit) \
- modwarn (name, alt_bit, "Alt"); \
- else \
+#define store_modifier(name,old) \
+ if (old && old != modifier_index) \
+ wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.", \
+ name, code, index_to_name (old), \
+ index_to_name (modifier_index)), \
+ warned_about_duplicate_modifiers = 1; \
+ if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
+ else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
+ else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
+ else if (sym == XK_Mode_switch) \
+ mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
+ else if (modifier_index == meta_bit && old != meta_bit) \
+ modwarn (name, meta_bit, "Meta"); \
+ else if (modifier_index == super_bit && old != super_bit) \
+ modwarn (name, super_bit, "Super"); \
+ else if (modifier_index == hyper_bit && old != hyper_bit) \
+ modwarn (name, hyper_bit, "Hyper"); \
+ else if (modifier_index == alt_bit && old != alt_bit) \
+ modwarn (name, alt_bit, "Alt"); \
+ else \
old = modifier_index;
mkpm = x_modifier_keymap->max_keypermod;
@@ -253,8 +253,7 @@ static void x_reset_modifier_mapping(Display * display)
else if (mode_bit == alt_bit)
warn = "Alt", alt_bit = 0;
if (warn) {
- wwarning
- ("%s is being used for both Mode_switch and %s.\n\n",
+ wwarning("%s is being used for both Mode_switch and %s.",
index_to_name(mode_bit), warn), warned_about_overlapping_modifiers = 1;
}
}
diff --git a/util/wmsetbg.c b/util/wmsetbg.c
index f12c26b..33ea447 100644
--- a/util/wmsetbg.c
+++ b/util/wmsetbg.c
@@ -492,7 +492,7 @@ BackgroundTexture *parseTexture(RContext * rc, char *text)
GETSTRORGOTO(val, tmp, 2, error);
if (!XParseColor(dpy, DefaultColormap(dpy, scr), tmp, &color)) {
- wwarning("could not parse color %s in texture %s\n", tmp, text);
+ wwarning("could not parse color %s in texture %s", tmp, text);
RReleaseImage(image);
goto error;
}
@@ -913,7 +913,7 @@ void helperLoop(RContext * rc)
buf[4] = 0;
workspace = atoi(buf);
if (workspace < 0 || workspace >= WORKSPACE_COUNT) {
- wwarning("received message with invalid workspace number %i\n", workspace);
+ wwarning("received message with invalid workspace number %i", workspace);
continue;
}
}
@@ -1216,7 +1216,7 @@ int main(int argc, char **argv)
} else if (strcmp(argv[i], "-display") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i - 1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
display = argv[i];
@@ -1246,38 +1246,38 @@ int main(int argc, char **argv)
update++;
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i - 1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
domain = wstrdup(argv[i]);
} else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--colors") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i - 1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
if (sscanf(argv[i], "%i", &cpc) != 1) {
- wfatal("bad value for colors per channel: \"%s\"\n", argv[i]);
+ wfatal("bad value for colors per channel: \"%s\"", argv[i]);
exit(1);
}
} else if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--back-color") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i - 1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
back_color = argv[i];
} else if (strcmp(argv[i], "-p") == 0 || strcmp(argv[i], "--parse") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i - 1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
texture = argv[i];
} else if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--workspace") == 0) {
i++;
if (i >= argc) {
- wfatal("too few arguments for %s\n", argv[i - 1]);
+ wfatal("too few arguments for %s", argv[i - 1]);
exit(1);
}
if (sscanf(argv[i], "%i", &workspace) != 1) {
--
1.7.0.4