/[global]/global/libutil/gtagsop.c
ViewVC logotype

Diff of /global/libutil/gtagsop.c

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

revision 1.52 by shigio, Sat Nov 6 09:25:16 2004 UTC revision 1.53 by shigio, Sun Nov 7 12:24:11 2004 UTC
# Line 421  gtags_add(gtop, comline, path, flags) Line 421  gtags_add(gtop, comline, path, flags)
421          FILE *ip;          FILE *ip;
422          STRBUF *sb = strbuf_open(0);          STRBUF *sb = strbuf_open(0);
423          STRBUF *ib = strbuf_open(MAXBUFLEN);          STRBUF *ib = strbuf_open(MAXBUFLEN);
         STRBUF *sort_command = strbuf_open(0);  
424          char *fid;          char *fid;
425    
426          /*          /*
          * get command name of sort.  
          */  
         if (!getconfs("sort_command", sort_command))  
                 die("cannot get sort command name.");  
 #if defined(_WIN32) || defined(__DJGPP__)  
         if (!locatestring(strbuf_value(sort_command), ".exe", MATCH_LAST))  
                 strbuf_puts(sort_command, ".exe");  
 #endif  
         /*  
427           * add path index if not yet.           * add path index if not yet.
428           */           */
429          gpath_put(path);          gpath_put(path);
# Line 457  gtags_add(gtop, comline, path, flags) Line 447  gtags_add(gtop, comline, path, flags)
447                  strbuf_putc(sb, ' ');                  strbuf_putc(sb, ' ');
448                  strbuf_puts(sb, fid);                  strbuf_puts(sb, fid);
449          }          }
450          if (gtop->format & GTAGS_COMPACT) {          if (gtop->format & GTAGS_COMPACT)
451                  strbuf_puts(sb, "| ");                  strbuf_puts(sb, "| gnusort -k 1,1 -k 2,2n");
                 strbuf_puts(sb, strbuf_value(sort_command));  
                 strbuf_putc(sb, ' ');  
                 strbuf_puts(sb, "-k 1,1 -k 2,2n");  
         }  
452          if (flags & GTAGS_UNIQUE)          if (flags & GTAGS_UNIQUE)
453                  strbuf_puts(sb, " -u");                  strbuf_puts(sb, " -u");
454  #ifdef DEBUG  #ifdef DEBUG
# Line 500  gtags_add(gtop, comline, path, flags) Line 486  gtags_add(gtop, comline, path, flags)
486          }          }
487          if (pclose(ip) < 0)          if (pclose(ip) < 0)
488                  die("terminated abnormally.");                  die("terminated abnormally.");
         strbuf_close(sort_command);  
489          strbuf_close(sb);          strbuf_close(sb);
490          strbuf_close(ib);          strbuf_close(ib);
491  }  }

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

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