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

Diff for /src/usr.bin/m4/gnum4.c between version 1.17 and 1.18

version 1.17, 2002/04/26 13:13:41 version 1.18, 2002/04/26 16:15:16
Line 67 
Line 67 
 static struct input_file *dopath(struct input_file *, const char *);  static struct input_file *dopath(struct input_file *, const char *);
   
 static struct path_entry *  static struct path_entry *
 new_path_entry(dirname)  new_path_entry(const char *dirname)
         const char *dirname;  
 {  {
         struct path_entry *n;          struct path_entry *n;
   
Line 83 
Line 82 
 }  }
   
 void  void
 addtoincludepath(dirname)  addtoincludepath(const char *dirname)
         const char *dirname;  
 {  {
         struct path_entry *n;          struct path_entry *n;
   
Line 124 
Line 122 
   
 static  static
 struct input_file *  struct input_file *
 dopath(i, filename)  dopath(struct input_file *i, const char *filename)
         struct input_file *i;  
         const char *filename;  
 {  {
         char path[MAXPATHLEN];          char path[MAXPATHLEN];
         struct path_entry *pe;          struct path_entry *pe;
Line 143 
Line 139 
 }  }
   
 struct input_file *  struct input_file *
 fopen_trypath(i, filename)  fopen_trypath(struct input_file *i, const char *filename)
         struct input_file *i;  
         const char *filename;  
 {  {
         FILE *f;          FILE *f;
   
Line 163 
Line 157 
 }  }
   
 void  void
 doindir(argv, argc)  doindir(const char *argv[], int argc)
         const char *argv[];  
         int argc;  
 {  {
         ndptr p;          ndptr p;
   
Line 177 
Line 169 
 }  }
   
 void  void
 dobuiltin(argv, argc)  dobuiltin(const char *argv[], int argc)
         const char *argv[];  
         int argc;  
 {  {
         int n;          int n;
         argv[1] = NULL;          argv[1] = NULL;
Line 210 
Line 200 
 #define addconstantstring(s) addchars((s), sizeof(s)-1)  #define addconstantstring(s) addchars((s), sizeof(s)-1)
   
 static void  static void
 addchars(c, n)  addchars(const char *c, size_t n)
         const char *c;  
         size_t n;  
 {  {
         if (n == 0)          if (n == 0)
                 return;                  return;
Line 230 
Line 218 
 }  }
   
 static void  static void
 addchar(c)  addchar(int c)
         int c;  
 {  {
         if (current +1 > bufsize) {          if (current +1 > bufsize) {
                 if (bufsize == 0)                  if (bufsize == 0)
Line 255 
Line 242 
   
   
 static void  static void
 exit_regerror(er, re)  exit_regerror(int er, regex_t *re)
         int er;  
         regex_t *re;  
 {  {
         size_t  errlen;          size_t  errlen;
         char    *errbuf;          char    *errbuf;
Line 269 
Line 254 
 }  }
   
 static void  static void
 add_sub(n, string, re, pm)  add_sub(int n, const char *string, regex_t *re, regmatch_t *pm)
         int n;  
         const char *string;  
         regex_t *re;  
         regmatch_t *pm;  
 {  {
         if (n > re->re_nsub)          if (n > re->re_nsub)
                 warnx("No subexpression %d", n);                  warnx("No subexpression %d", n);
Line 290 
Line 271 
  * constructs and replacing them with substrings of the original string.   * constructs and replacing them with substrings of the original string.
  */   */
 static void  static void
 add_replace(string, re, replace, pm)  add_replace(const char *string, regex_t *re, const char *replace, regmatch_t *pm)
         const char *string;  
         regex_t *re;  
         const char *replace;  
         regmatch_t *pm;  
 {  {
         const char *p;          const char *p;
   
Line 327 
Line 304 
 }  }
   
 static void  static void
 do_subst(string, re, replace, pm)  do_subst(const char *string, regex_t *re, const char *replace, regmatch_t *pm)
         const char *string;  
         regex_t *re;  
         const char *replace;  
         regmatch_t *pm;  
 {  {
         int error;          int error;
         int flags = 0;          int flags = 0;
Line 371 
Line 344 
 }  }
   
 static void  static void
 do_regexp(string, re, replace, pm)  do_regexp(const char *string, regex_t *re, const char *replace, regmatch_t *pm)
         const char *string;  
         regex_t *re;  
         const char *replace;  
         regmatch_t *pm;  
 {  {
         int error;          int error;
   
Line 392 
Line 361 
 }  }
   
 static void  static void
 do_regexpindex(string, re, pm)  do_regexpindex(const char *string, regex_t *re, regmatch_t *pm)
         const char *string;  
         regex_t *re;  
         regmatch_t *pm;  
 {  {
         int error;          int error;
   
Line 415 
Line 381 
  * says. So we twiddle with the regexp before passing it to regcomp.   * says. So we twiddle with the regexp before passing it to regcomp.
  */   */
 static char *  static char *
 twiddle(p)  twiddle(const char *p)
         const char *p;  
 {  {
         /* This could use strcspn for speed... */          /* This could use strcspn for speed... */
         while (*p != '\0') {          while (*p != '\0') {
Line 461 
Line 426 
  * argv[4]: opt rep   * argv[4]: opt rep
  */   */
 void  void
 dopatsubst(argv, argc)  dopatsubst(const char *argv[], int argc)
         const char *argv[];  
         int argc;  
 {  {
         int error;          int error;
         regex_t re;          regex_t re;
Line 487 
Line 450 
 }  }
   
 void  void
 doregexp(argv, argc)  doregexp(const char *argv[], int argc)
         const char *argv[];  
         int argc;  
 {  {
         int error;          int error;
         regex_t re;          regex_t re;
Line 514 
Line 475 
 }  }
   
 void  void
 doesyscmd(cmd)  doesyscmd(const char *cmd)
         const char *cmd;  
 {  {
         int p[2];          int p[2];
         pid_t pid, cpid;          pid_t pid, cpid;

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18