bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] exit status


From: Hideki IWAMOTO
Subject: [PATCH] exit status
Date: Thu, 27 Feb 2003 21:46:38 +0900

According to GNU Coding Standards, when "--help" is specified, 
the program should exit successfully.

? gtags/.deps
? gtags/Makefile
? gtags/Makefile.in
? gtags/const.h
? gtags/gtags
? gtags/gtags.1
? htags/Makefile
? htags/Makefile.in
? htags/const.pl
? htags/htags
? htags/htags.1
Index: gtags/gtags.c
===================================================================
RCS file: /cvsroot/global/global/gtags/gtags.c,v
retrieving revision 1.60
diff -u -r1.60 gtags.c
--- gtags/gtags.c       23 Feb 2003 13:02:02 -0000      1.60
+++ gtags/gtags.c       27 Feb 2003 12:26:54 -0000
@@ -47,6 +47,7 @@
 #include "const.h"
 
 static void    usage(void);
+static void    help(void);
 void   signal_setup(void);
 void   onintr(int);
 int    match(char *, char *);
@@ -106,7 +107,7 @@
 {
        fputs(usage_const, stdout);
        fputs(help_const, stdout);
-       exit(2);
+       exit(0);
 }
 
 static struct option const long_options[] = {
Index: htags/htags.in
===================================================================
RCS file: /cvsroot/global/global/htags/htags.in,v
retrieving revision 1.95
diff -u -r1.95 htags.in
--- htags/htags.in      24 Feb 2003 13:37:07 -0000      1.95
+++ htags/htags.in      27 Feb 2003 12:26:55 -0000
@@ -682,7 +682,7 @@
 }
 if ($show_help) {
        print STDOUT $help_const;
-       exit 1;
+       exit 0;
 }
 if ($'gflag) {
        local($command) = $'gtags;

----
Hideki IWAMOTO  address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]