[BACK]Return to ctags.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ctags

Diff for /src/usr.bin/ctags/ctags.c between version 1.4 and 1.5

version 1.4, 1999/07/02 18:37:11 version 1.5, 2000/07/25 19:28:30
Line 95 
Line 95 
         int     exit_val;                       /* exit value */          int     exit_val;                       /* exit value */
         int     step;                           /* step through args */          int     step;                           /* step through args */
         int     ch;                             /* getopts char */          int     ch;                             /* getopts char */
         char    cmd[100];                       /* too ugly to explain */          char    *cmd;
   
         aflag = uflag = NO;          aflag = uflag = NO;
         while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != -1)          while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != -1)
Line 160 
Line 160 
                 else {                  else {
                         if (uflag) {                          if (uflag) {
                                 for (step = 0; step < argc; step++) {                                  for (step = 0; step < argc; step++) {
                                         (void)sprintf(cmd,                                          (void)asprintf(&cmd,
                                                 "mv %s OTAGS; fgrep -v '\t%s\t' OTAGS >%s; rm OTAGS",                                              "mv %s OTAGS; fgrep -v '\t%s\t' OTAGS >%s; rm OTAGS",
                                                         outfile, argv[step],                                              outfile, argv[step], outfile);
                                                         outfile);                                          if (cmd == NULL)
                                                   err(1, "out of space");
                                         system(cmd);                                          system(cmd);
                                           free(cmd);
                                           cmd = NULL;
                                 }                                  }
                                 ++aflag;                                  ++aflag;
                         }                          }
Line 173 
Line 176 
                         put_entries(head);                          put_entries(head);
                         (void)fclose(outf);                          (void)fclose(outf);
                         if (uflag) {                          if (uflag) {
                                 (void)sprintf(cmd, "sort -o %s %s",                                  (void)asprintf(&cmd, "sort -o %s %s",
                                                 outfile, outfile);                                      outfile, outfile);
                                   if (cmd == NULL)
                                                   err(1, "out of space");
                                 system(cmd);                                  system(cmd);
                                   free(cmd);
                                   cmd = NULL;
                         }                          }
                 }                  }
         }          }
Line 231 
Line 238 
         char    *cp;          char    *cp;
   
         lineno = 0;                             /* should be 1 ?? KB */          lineno = 0;                             /* should be 1 ?? KB */
         if (cp = strrchr(file, '.')) {          if ((cp = strrchr(file, '.'))) {
                 if (cp[1] == 'l' && !cp[2]) {                  if (cp[1] == 'l' && !cp[2]) {
                         int     c;                          int     c;
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5