Introduction
Introduction Statistics Contact Development Disclaimer Help
add usage information - xscreenshot - screen capture tool
git clone git://git.codemadness.org/xscreenshot
Log
Files
Refs
README
LICENSE
---
commit 5e5fc6da22d1a496e21a52941af91f85b58186d2
parent 5f514c5284b3db94ecb4db1fea1e387d66ed4651
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 28 Jul 2014 14:55:17 +0000
add usage information
Signed-off-by: Hiltjo Posthuma <[email protected]>
Diffstat:
M xscreenshot.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/xscreenshot.c b/xscreenshot.c
@@ -93,6 +93,14 @@ pngstdout(XImage *img)
png_destroy_write_struct(&png_struct_p, NULL);
}
+static void
+usage(void)
+{
+ die("xscreenshot-" VERSION
+ ", (c) 2014 xscreenshot engineers, see LICENSE for details\n"
+ "usage: xscreenshot [winid]");
+}
+
int
main(int argc, char *argv[])
{
@@ -107,10 +115,12 @@ main(int argc, char *argv[])
/* win */
if(argc > 1) {
+ if(strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "-v") == 0)
+ usage();
errno = 0;
win = (Window)strtol(argv[1], NULL, 0);
if(errno != 0)
- die("input not a number");
+ usage();
} 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.