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

Diff of /global/gtags/gtags.c

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

revision 1.124 by shigio, Fri Jul 29 13:33:14 2005 UTC revision 1.125 by shigio, Sat Jul 30 03:15:02 2005 UTC
# Line 51  Line 51 
51  #ifdef HAVE_UNISTD_H  #ifdef HAVE_UNISTD_H
52  #include <unistd.h>  #include <unistd.h>
53  #endif  #endif
 #ifdef HAVE_LIMITS_H  
 #include <limits.h>  
 #endif  
54  #include "getopt.h"  #include "getopt.h"
55    
56  #include "global.h"  #include "global.h"
57  #include "const.h"  #include "const.h"
58    
 #if !defined(ARG_MAX) && defined(_SC_ARG_MAX)  
 #define ARG_MAX         sysconf(_SC_ARG_MAX)  
 #endif  
   
59  static void usage(void);  static void usage(void);
60  static void help(void);  static void help(void);
61  void signal_setup(void);  void signal_setup(void);
# Line 821  updatetags(dbpath, root, deleteset, addl Line 814  updatetags(dbpath, root, deleteset, addl
814          /*          /*
815           * determine the maximum length of the list of paths.           * determine the maximum length of the list of paths.
816           */           */
817  #ifdef ARG_MAX          path_list_max = exec_line_limit();
818          if (noxargs) {          path_list_max -= strbuf_getlen(comline);
819                  /* force processing files individually. */          path_list_max -= 40;
820            if (path_list_max < 0)
821                  path_list_max = 0;                  path_list_max = 0;
822          } else {  
                 path_list_max = ARG_MAX;  
                 path_list_max -= 2048;  
                 if (path_list_max > 20 * 1024)  
                         path_list_max = 20 * 1024;  
                 path_list_max -= env_size();  
                 path_list_max -= strbuf_getlen(comline);  
                 path_list_max -= 40;  
                 if (path_list_max < 0)  
                         path_list_max = 0;  
         }  
 #else  
         path_list_max = 0;  
 #endif  
823          gtop = gtags_open(dbpath, root, db, GTAGS_MODIFY, 0);          gtop = gtags_open(dbpath, root, db, GTAGS_MODIFY, 0);
824          if (vflag) {          if (vflag) {
825                  char fid[32];                  char fid[32];
# Line 944  createtags(dbpath, root, db) Line 925  createtags(dbpath, root, db)
925          /*          /*
926           * determine the maximum length of the list of paths.           * determine the maximum length of the list of paths.
927           */           */
928  #ifdef ARG_MAX          path_list_max = exec_line_limit();
929          if (noxargs) {          path_list_max -= strbuf_getlen(comline);
930                  /* force processing files individually. */          path_list_max -= 40;
931                  path_list_max = 0;          if (path_list_max < 0)
932          } else {                  path_list_max = 0;;
                 path_list_max = ARG_MAX;  
                 path_list_max -= 2048;  
                 if (path_list_max > 20 * 1024)  
                         path_list_max = 20 * 1024;  
                 path_list_max -= env_size();  
                 path_list_max -= strbuf_getlen(comline);  
                 path_list_max -= 40;  
                 if (path_list_max < 0)  
                         path_list_max = 0;  
         }  
 #else  
         path_list_max = 0;  
 #endif  
933    
934          flags = 0;          flags = 0;
935          /*          /*

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.125

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