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

Diff of /global/global/global.c

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

revision 1.96 by h-iwamoto, Mon Jun 27 13:04:38 2005 UTC revision 1.97 by h-iwamoto, Tue Jul 5 11:40:47 2005 UTC
# Line 64  void idutils(const char *, const char *) Line 64  void idutils(const char *, const char *)
64  void grep(const char *);  void grep(const char *);
65  void pathlist(const char *, const char *);  void pathlist(const char *, const char *);
66  void parsefile(int, char **, const char *, const char *, const char *, int);  void parsefile(int, char **, const char *, const char *, const char *, int);
67  static int exec_parser(const char *, const char *, const char *, const char *, FILE *);  static int exec_parser(const char *, STRBUF *, const char *, const char *, FILE *);
68  void printtag(FILE *, const char *);  void printtag(FILE *, const char *);
69  int search(const char *, const char *, const char *, int);  int search(const char *, const char *, const char *, int);
70  int includepath(const char *, const char *);  int includepath(const char *, const char *);
# Line 984  parsefile(argc, argv, cwd, root, dbpath, Line 984  parsefile(argc, argv, cwd, root, dbpath,
984                  }                  }
985    
986                  if (strbuf_getlen(path_list)                  if (strbuf_getlen(path_list)
987                      && strbuf_getlen(path_list) + 1 + strlen(path) > path_list_max) {                      && strbuf_getlen(path_list) + strlen(path) > path_list_max) {
988                          count += exec_parser(parser, strbuf_value(path_list),                          count += exec_parser(parser, path_list, cwd, root, op);
                                         cwd, root, op);  
989                          strbuf_reset(path_list);                          strbuf_reset(path_list);
990                  }                  }
991    
992                  if (strbuf_getlen(path_list))                  strbuf_puts0(path_list, path);
                         strbuf_putc(path_list, ' ');  
                 strbuf_puts(path_list, path);  
         }  
         if (strbuf_getlen(path_list)) {  
                 count += exec_parser(parser, strbuf_value(path_list),  
                                 cwd, root, op);  
993          }          }
994            if (strbuf_getlen(path_list))
995                    count += exec_parser(parser, path_list, cwd, root, op);
996          gpath_close();          gpath_close();
997          closefilter(op);          closefilter(op);
998          strbuf_close(sb);          strbuf_close(sb);
# Line 1016  parsefile(argc, argv, cwd, root, dbpath, Line 1011  parsefile(argc, argv, cwd, root, dbpath,
1011   * exec_parser: execute parser   * exec_parser: execute parser
1012   *   *
1013   *      i)      parser          template of command line   *      i)      parser          template of command line
1014   *      i)      path_list       space separated list of path   *      i)      path_list       \0 separated list of paths
1015   *      i)      cwd             current directory   *      i)      cwd             current directory
1016   *      i)      root            root directory of source tree   *      i)      root            root directory of source tree
1017   *      i)      op              filter to output   *      i)      op              filter to output
# Line 1025  parsefile(argc, argv, cwd, root, dbpath, Line 1020  parsefile(argc, argv, cwd, root, dbpath,
1020  static int  static int
1021  exec_parser(parser, path_list, cwd, root, op)  exec_parser(parser, path_list, cwd, root, op)
1022          const char *parser;          const char *parser;
1023          const char *path_list;          STRBUF *path_list;
1024          const char *cwd;          const char *cwd;
1025          const char *root;          const char *root;
1026          FILE *op;          FILE *op;

Legend:
Removed from v.1.96  
changed lines
  Added in v.1.97

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