summaryrefslogtreecommitdiff
path: root/system/snapscreenshot/errors_to_stderr.diff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2018-07-06 22:51:04 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-07-07 06:54:18 +0700
commita274538685d16c0f4e6a6e05121a2600f010bc11 (patch)
treedb9d6dd017c59eae6824f92cb83a43cee9b926c7 /system/snapscreenshot/errors_to_stderr.diff
parenta2dcdb585af8af69ff73c3e11de684a8906badb9 (diff)
downloadslackbuilds-a274538685d16c0f4e6a6e05121a2600f010bc11.tar.gz
system/snapscreenshot: Added (screenshot program for text consoles).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/snapscreenshot/errors_to_stderr.diff')
-rw-r--r--system/snapscreenshot/errors_to_stderr.diff42
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);