diff options
Diffstat (limited to 'system/snapscreenshot/errors_to_stderr.diff')
-rw-r--r-- | system/snapscreenshot/errors_to_stderr.diff | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/system/snapscreenshot/errors_to_stderr.diff b/system/snapscreenshot/errors_to_stderr.diff new file mode 100644 index 0000000000..d769e262bd --- /dev/null +++ b/system/snapscreenshot/errors_to_stderr.diff @@ -0,0 +1,42 @@ +diff -Naur snapscreenshot-1.0.14.3/argh.c snapscreenshot-1.0.14.3.patched/argh.c +--- snapscreenshot-1.0.14.3/argh.c 2009-08-31 07:23:26.000000000 -0400 ++++ snapscreenshot-1.0.14.3.patched/argh.c 2018-07-04 17:48:36.194652959 -0400 +@@ -13,7 +13,7 @@ + long tmp = strtol(*s, (char **)s, 10); + if(tmp<min || tmp>max) + { +- printf("%s: parameter (--%s) value out of range `%ld'\n", ProgName, LastParm, tmp); ++ fprintf(stderr, "%s: parameter (--%s) value out of range `%ld'\n", ProgName, LastParm, tmp); + exit(EXIT_FAILURE); + } + return tmp; +@@ -21,14 +21,14 @@ + + void SuggestHelp(void) + { +- printf("\nTry `%s --help' for more information.\n", ProgName); ++ fprintf(stderr, "\nTry `%s --help' for more information.\n", ProgName); + } + void ArgError(int a, const char *b) + { + switch(a) + { + case 0: +- printf("%s: illegal option -- %c", ProgName, *b); ++ fprintf(stderr, "%s: illegal option -- %c", ProgName, *b); + for(a=0; Options[a].c; a++) + if(*b == Options[a].c) + { +@@ -37,10 +37,10 @@ + } + break; + case 1: +- printf("%s: unrecognized option `--%s'", ProgName, b); ++ fprintf(stderr, "%s: unrecognized option `--%s'", ProgName, b); + break; + default: +- printf("%s: invalid parameter: `%s'\n", ProgName, b); ++ fprintf(stderr, "%s: invalid parameter: `%s'\n", ProgName, b); + } + SuggestHelp(); + exit(EXIT_FAILURE); |