# HG changeset patch # User Brendan Donegan # Date 1276614468 -3600 # Node ID ced935b952efe58cf007f0ff6f9c455ab63f2f2d # Parent 8df66256e3b7ce54314d5a4c0ea3a16934876284 Fix for Bug 2945 - Concatenation in Macros, redefined stuff diff -r 8df66256e3b7 -r ced935b952ef coreapplicationuis/powersaveutilities/batterypopupcontrol/inc/trace.h --- a/coreapplicationuis/powersaveutilities/batterypopupcontrol/inc/trace.h Fri Jun 11 16:24:38 2010 +0100 +++ b/coreapplicationuis/powersaveutilities/batterypopupcontrol/inc/trace.h Tue Jun 15 16:07:48 2010 +0100 @@ -51,7 +51,7 @@ /** * Prefix macro for strings */ -#define _PREFIX_CHAR( aMsg ) (const char*)"[BatteryPopupControl]: " ##aMsg +#define _PREFIX_CHAR( aMsg ) (const char*)"[BatteryPopupControl]: " aMsg /** * Define needed directories if TRACE_INTO_FILE macro in use diff -r 8df66256e3b7 -r ced935b952ef coreapplicationuis/powersaveutilities/bsutil/inc/trace.h --- a/coreapplicationuis/powersaveutilities/bsutil/inc/trace.h Fri Jun 11 16:24:38 2010 +0100 +++ b/coreapplicationuis/powersaveutilities/bsutil/inc/trace.h Tue Jun 15 16:07:48 2010 +0100 @@ -51,7 +51,7 @@ /** * Prefix macro for strings */ -#define _PREFIX_CHAR( aMsg ) (const char*)"[BSUtil]: " ##aMsg +#define _PREFIX_CHAR( aMsg ) (const char*)"[BSUtil]: " aMsg /** * Define needed directories if TRACE_INTO_FILE macro in use diff -r 8df66256e3b7 -r ced935b952ef openenvutils/commandshell/shell/commands/cp/src/cp.c --- a/openenvutils/commandshell/shell/commands/cp/src/cp.c Fri Jun 11 16:24:38 2010 +0100 +++ b/openenvutils/commandshell/shell/commands/cp/src/cp.c Tue Jun 15 16:07:48 2010 +0100 @@ -125,6 +125,16 @@ } #endif + +static void +usage_msg() +{ + (void)fprintf(stderr, "%s\n%s\n", + "usage: cp [-R ] [-fip] src target", + " cp [-R ] [-fip] src1 ... srcN directory"); + return; +} + int cp_internal(int argc, char *argv[]) { @@ -176,7 +186,7 @@ rflag = 1; break; default: - usage(); + usage_msg(); return 1; } argc -= optind; @@ -184,7 +194,7 @@ if (argc < 2) { - usage(); + usage_msg(); return 1; } @@ -272,7 +282,7 @@ * Case (1). Target is not a directory. */ if (argc > 1) { - usage(); + usage_msg(); return (1); } /* @@ -563,13 +573,3 @@ return (1); return (0); } - -static void -usage() -{ - (void)fprintf(stderr, "%s\n%s\n", - "usage: cp [-R ] [-fip] src target", - " cp [-R ] [-fip] src1 ... srcN directory"); - return; -} - diff -r 8df66256e3b7 -r ced935b952ef openenvutils/commandshell/shell/commands/ls/src/ls.c --- a/openenvutils/commandshell/shell/commands/ls/src/ls.c Fri Jun 11 16:24:38 2010 +0100 +++ b/openenvutils/commandshell/shell/commands/ls/src/ls.c Tue Jun 15 16:07:48 2010 +0100 @@ -172,6 +172,16 @@ } #endif +static +void +usage_msg() +{ + (void)fprintf(stderr, + "usage: ls [-1ACFRSWacdfklmpqrstux] [file ...]\n"); + + return; +} + int ls_main(argc, argv) int argc; @@ -305,7 +315,7 @@ f_whiteout = 1; break; default: - usage(); + usage_msg(); return 1; } } @@ -674,13 +684,17 @@ if (b_info == FTS_ERR) return (0); - if (a_info == FTS_NS || b_info == FTS_NS) - if (b_info != FTS_NS) - return (1); - else if (a_info != FTS_NS) - return (-1); - else - return (namecmp(*a, *b)); + if (a_info == FTS_NS || b_info == FTS_NS) { + if (b_info != FTS_NS) { + return (1); + } + else if (a_info != FTS_NS) { + return (-1); + } + else { + return (namecmp(*a, *b)); + } + } if (a_info != b_info && (*a)->fts_level == FTS_ROOTLEVEL && !f_listdir) { @@ -691,14 +705,3 @@ } return (sortfcn(*a, *b)); } - - -static -void -usage() -{ - (void)fprintf(stderr, - "usage: ls [-1ACFRSWacdfklmpqrstux] [file ...]\n"); - - return; -} diff -r 8df66256e3b7 -r ced935b952ef openenvutils/commandshell/shell/commands/touch/src/touch.c --- a/openenvutils/commandshell/shell/commands/touch/src/touch.c Fri Jun 11 16:24:38 2010 +0100 +++ b/openenvutils/commandshell/shell/commands/touch/src/touch.c Tue Jun 15 16:07:48 2010 +0100 @@ -93,6 +93,14 @@ #endif #endif +static void +usage_msg() +{ + (void)fprintf(stderr, + "usage: touch [-acfm] [-r file] [-t time] file ...\n"); + return; +} + int touch_internal(int argc, char *argv[]) { @@ -136,7 +144,7 @@ break; case '?': default: - usage(); + usage_msg(); return 1; } @@ -166,7 +174,7 @@ if (*argv == NULL) { - usage(); + usage_msg(); return 1; } @@ -406,11 +414,3 @@ } return (rval); } - -static void -usage() -{ - (void)fprintf(stderr, - "usage: touch [-acfm] [-r file] [-t time] file ...\n"); - return; -}