/[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.99 by shigio, Mon Jul 25 02:40:25 2005 UTC revision 1.100 by shigio, Sat Jul 30 03:15:01 2005 UTC
# Line 39  Line 39 
39  #ifdef HAVE_UNISTD_H  #ifdef HAVE_UNISTD_H
40  #include <unistd.h>  #include <unistd.h>
41  #endif  #endif
 #ifdef HAVE_LIMITS_H  
 #include <limits.h>  
 #endif  
42  #include "getopt.h"  #include "getopt.h"
43    
44  #include "global.h"  #include "global.h"
45  #include "regex.h"  #include "regex.h"
46  #include "const.h"  #include "const.h"
47    
 #if !defined(ARG_MAX) && defined(_SC_ARG_MAX)  
 #define ARG_MAX         sysconf(_SC_ARG_MAX)  
 #endif  
   
48  static void usage(void);  static void usage(void);
49  static void help(void);  static void help(void);
50  static void setcom(int);  static void setcom(int);
# Line 927  parsefile(argc, argv, cwd, root, dbpath, Line 920  parsefile(argc, argv, cwd, root, dbpath,
920          /*          /*
921           * determine the maximum length of the list of paths.           * determine the maximum length of the list of paths.
922           */           */
923  #ifdef ARG_MAX          path_list_max = exec_line_limit();
         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();  
924          path_list_max -= strbuf_getlen(comline);          path_list_max -= strbuf_getlen(comline);
925          path_list_max -= 40;          path_list_max -= 40;
926          if (path_list_max < 0)          if (path_list_max < 0)
927                  path_list_max = 0;                  path_list_max = 0;
 #else  
         path_list_max = 0;  
 #endif  
928    
929          if (!(op = openfilter()))          if (!(op = openfilter()))
930                  die("cannot open output filter.");                  die("cannot open output filter.");

Legend:
Removed from v.1.99  
changed lines
  Added in v.1.100

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