[PATCH xwd] Ensure consistency between the manpage and the output of the -help option

Stéphane Aulery lkppo at free.fr
Sat Jul 6 18:03:59 PDT 2013


Signed-off-by: Stéphane Aulery <lkppo at free.fr>
---
 man/xwd.man |   14 +++++++++-----
 xwd.c       |   23 ++++++++++++++++++-----
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/man/xwd.man b/man/xwd.man
index 4dc9041..76e07d7 100644
--- a/man/xwd.man
+++ b/man/xwd.man
@@ -28,8 +28,8 @@ xwd - dump an image of an X window
 .SH SYNOPSIS
 .B "xwd"
 [-debug] [-help] [-nobdrs] [-out \fIfile\fP] [-xy] [-frame] [-add \fIvalue\fP]
-[-root | -id \fIid\fP | -name \fIname\fP ] [-icmap] [-screen] [-silent]
-[-display \fIdisplay\fP]
+[-root | -id \fIwdid\fP | -name \fIwdname\fP ] [-icmap] [-screen] [-silent]
+[-display \fIhost:dpy\fP]
 .SH DESCRIPTION
 .PP
 .I Xwd
@@ -44,7 +44,11 @@ the dump is completed.
 .SH OPTIONS
 .PP
 .TP 8
-.B "-display \fIdisplay\fP"
+.B "-debug"
+Enable debug mode.
+.PP
+.TP 8
+.B "-d, -display \fIhost:dpy\fP"
 This argument allows you to specify the server to connect to; see \fIX(__miscmansuffix__)\fP.
 .PP
 .TP 8
@@ -83,13 +87,13 @@ This option indicates that the root window should be selected for the
 window dump, without requiring the user to select a window with the pointer.
 .PP
 .TP 8
-.B "-id \fIid\fP"
+.B "-id \fIwdid\fP"
 This option indicates that the window with the specified resource id
 should be selected for the window dump, without requiring the user to
 select a window with the pointer.
 .PP
 .TP 8
-.B "-name \fIname\fP"
+.B "-name \fIwdname\fP"
 This option indicates that the window with the specified WM_NAME property
 should be selected for the window dump, without requiring the user to
 select a window with the pointer.
diff --git a/xwd.c b/xwd.c
index 5b40121..eb60a07 100644
--- a/xwd.c
+++ b/xwd.c
@@ -242,7 +242,7 @@ Get24bitDirectColors(XColor **colors)
 
 /*
  * Window_Dump: dump a window to a file which must already be open for
- *              writting.
+ *              writing.
  */
 
 void
@@ -519,10 +519,23 @@ Window_Dump(Window window, FILE *out)
 void
 usage(void)
 {
-    fprintf (stderr,
-"usage: %s [-display host:dpy] [-debug] [-help] %s [-nobdrs] [-out <file>]",
-	   program_name, "[{-root|-id <id>|-name <name>}]");
-    fprintf (stderr, " [-xy] [-add value] [-frame]\n");
+    fprintf(stderr, "Usage: %s [options] [-root| -id <wdid>| -name <wdname>] > mywddump\n", progname);
+    fprintf(stderr, "Usage: %s [options] [-root| -id <wdid>| -name <wdname>] -out mywddump\n", progname);
+    fprintf(stderr, "Options:\n");
+    fprintf(stderr, "  -help                    Print this message\n");
+    fprintf(stderr, "  -debug                   Enable debug mode\n");
+    fprintf(stderr, "  -d, -display <host:dpy>  Specify server to connect\n");
+    fprintf(stderr, "  -nobdrs                  Exclude window borders\n");
+    fprintf(stderr, "  -out <file>              Specify an output file\n");
+    fprintf(stderr, "  -xy                      Select XY dumping format for color displays\n");
+    fprintf(stderr, "  -add <value>             Add a signed value to every pixel\n");
+    fprintf(stderr, "  -frame                   Include window manager frame\n");
+    fprintf(stderr, "  -root                    Select the root window\n");
+    fprintf(stderr, "  -id <wdid>               Select a window by its resource id\n");
+    fprintf(stderr, "  -name <wdname>           Select a window by its WM_NAME property\n");
+    fprintf(stderr, "  -icmap                   Use the first colormap of the screen\n");
+    fprintf(stderr, "  -screen                  Send the request against the root window\n");
+    fprintf(stderr, "  -silent                  Don't ring any bells\n");
     exit(1);
 }
 
-- 
1.7.10.4



More information about the xorg-devel mailing list