xscreenshot

screen capture tool (mirror)
git clone git://git.2f30.org/xscreenshot
Log | Files | Refs | README | LICENSE

commit 11794e5af35d61c0477e1a267c862939c2c8f674
parent cd1359cce761e458e956453bd99b4bac021723f2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 16 Nov 2015 21:22:16 +0100

some more minor code-style improvements

Diffstat:
Mxscreenshot.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); }