Introduction
Introduction Statistics Contact Development Disclaimer Help
some more minor code-style improvements - xscreenshot - screen capture tool
git clone git://git.codemadness.org/xscreenshot
Log
Files
Refs
README
LICENSE
---
commit 11794e5af35d61c0477e1a267c862939c2c8f674
parent cd1359cce761e458e956453bd99b4bac021723f2
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 16 Nov 2015 21:22:16 +0100
some more minor code-style improvements
Diffstat:
M xscreenshot.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/xscreenshot.c b/xscreenshot.c
@@ -13,15 +13,16 @@
#include <X11/Xutil.h>
static void
-die(const char *s) {
+die(const char *s)
+{
fprintf(stderr, "xscreenshot: %s\n", s);
exit(1);
}
static void
-usage(char *argv0)
+usage(char **argv)
{
- fprintf(stderr, "usage: %s [winid]\n", argv0);
+ fprintf(stderr, "usage: %s [winid]\n", argv[0]);
exit(1);
}
@@ -41,11 +42,11 @@ main(int argc, char *argv[])
/* identify window */
if (argc > 1) {
if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "-v") == 0)
- usage(argv[0]);
+ usage(argv);
errno = 0;
win = (Window)strtol(argv[1], NULL, 0);
- if (errno != 0)
- usage(argv[0]);
+ if (errno)
+ usage(argv);
} else {
win = RootWindow(dpy, 0);
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.