[PATCH xwd] Use real program name for help message and fix a typo
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Jul 6 19:04:02 PDT 2013
On 07/ 6/13 06:18 PM, Stéphane Aulery wrote:
> Signed-off-by: Stéphane Aulery <lkppo at free.fr>
> ---
> xwd.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/xwd.c b/xwd.c
> index eb60a07..fd914c9 100644
> --- a/xwd.c
> +++ b/xwd.c
> @@ -89,6 +89,8 @@ in this Software without prior written authorization from The Open Group.
> #include <X11/extensions/XKBbells.h>
> #endif
>
> +static char *progname;
[...]
> + progname = argv[0];
xwd already has program_name storing argv[0] and uses it in the existing
error messages & usage() function.
dsimple.c:
char *program_name = "unknown_program";
dsimple.h:
extern char *program_name; /* Name of this program */
#define INIT_NAME program_name=argv[0] /* use this in main to setup
program_name */
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list