/[emacs]/emacs/lib-src/etags.c
ViewVC logotype

Diff of /emacs/lib-src/etags.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3.35.2.1 by handa, Fri Apr 16 12:49:44 2004 UTC revision 3.35.2.2 by miles, Mon Jun 28 07:28:22 2004 UTC
# Line 177  If you want regular expression support, Line 177  If you want regular expression support,
177  # define CTAGS FALSE  # define CTAGS FALSE
178  #endif  #endif
179    
 /* Exit codes for success and failure.  */  
 #ifdef VMS  
 # define        GOOD    1  
 # define        BAD     0  
 #else  
 # define        GOOD    0  
 # define        BAD     1  
 #endif  
   
180  #define streq(s,t)      (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t))  #define streq(s,t)      (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t))
181  #define strcaseeq(s,t)  (assert((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t))  #define strcaseeq(s,t)  (assert((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t))
182  #define strneq(s,t,n)   (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n))  #define strneq(s,t,n)   (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n))
# Line 830  print_version () Line 821  print_version ()
821    puts ("Copyright (C) 2002 Free Software Foundation, Inc. and Ken Arnold");    puts ("Copyright (C) 2002 Free Software Foundation, Inc. and Ken Arnold");
822    puts ("This program is distributed under the same terms as Emacs");    puts ("This program is distributed under the same terms as Emacs");
823    
824    exit (GOOD);    exit (EXIT_SUCCESS);
825  }  }
826    
827  static void  static void
# Line 849  print_help (argbuffer) Line 840  print_help (argbuffer)
840        }        }
841    
842    if (help_for_lang)    if (help_for_lang)
843      exit (GOOD);      exit (EXIT_SUCCESS);
844    
845    printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\    printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\
846  \n\  \n\
# Line 990  Relative ones are stored relative to the Line 981  Relative ones are stored relative to the
981    puts ("");    puts ("");
982    puts ("Report bugs to bug-gnu-emacs@gnu.org");    puts ("Report bugs to bug-gnu-emacs@gnu.org");
983    
984    exit (GOOD);    exit (EXIT_SUCCESS);
985  }  }
986    
987    
# Line 1413  main (argc, argv) Line 1404  main (argc, argv)
1404    
1405        if (fclose (tagf) == EOF)        if (fclose (tagf) == EOF)
1406          pfatal (tagfile);          pfatal (tagfile);
1407        exit (GOOD);        exit (EXIT_SUCCESS);
1408      }      }
1409    
1410    if (update)    if (update)
# Line 1432  main (argc, argv) Line 1423  main (argc, argv)
1423            sprintf (cmd,            sprintf (cmd,
1424                     "mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS",                     "mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS",
1425                     tagfile, argbuffer[i].what, tagfile);                     tagfile, argbuffer[i].what, tagfile);
1426            if (system (cmd) != GOOD)            if (system (cmd) != EXIT_SUCCESS)
1427              fatal ("failed to execute shell command", (char *)NULL);              fatal ("failed to execute shell command", (char *)NULL);
1428          }          }
1429        append_to_tagfile = TRUE;        append_to_tagfile = TRUE;
# Line 1453  main (argc, argv) Line 1444  main (argc, argv)
1444        sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile);        sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile);
1445        exit (system (cmd));        exit (system (cmd));
1446      }      }
1447    return GOOD;    return EXIT_SUCCESS;
1448  }  }
1449    
1450    
# Line 6470  fatal (s1, s2) Line 6461  fatal (s1, s2)
6461       char *s1, *s2;       char *s1, *s2;
6462  {  {
6463    error (s1, s2);    error (s1, s2);
6464    exit (BAD);    exit (EXIT_FAILURE);
6465  }  }
6466    
6467  static void  static void
# Line 6478  pfatal (s1) Line 6469  pfatal (s1)
6469       char *s1;       char *s1;
6470  {  {
6471    perror (s1);    perror (s1);
6472    exit (BAD);    exit (EXIT_FAILURE);
6473  }  }
6474    
6475  static void  static void
# Line 6492  fprintf (stderr, "\tTry `%s %s' for a co Line 6483  fprintf (stderr, "\tTry `%s %s' for a co
6483  fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",  fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
6484           progname, "-h");           progname, "-h");
6485  #endif  #endif
6486    exit (BAD);    exit (EXIT_FAILURE);
6487  }  }
6488    
6489  /* Print error message.  `s1' is printf control string, `s2' is arg for it. */  /* Print error message.  `s1' is printf control string, `s2' is arg for it. */
# Line 6788  xrealloc (ptr, size) Line 6779  xrealloc (ptr, size)
6779    
6780  /* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051  /* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051
6781     (do not change this comment) */     (do not change this comment) */
6782    
6783    /* etags.c ends here */

Legend:
Removed from v.3.35.2.1  
changed lines
  Added in v.3.35.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26