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

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

version 1.17, 1999/09/14 08:35:16 version 1.18, 1999/11/17 15:34:13
Line 138 
Line 138 
 extern int optind;  extern int optind;
 extern char *optarg;  extern char *optarg;
   
 void macro();  static void macro __P((void));
 void initkwds();  static void initkwds __P((void));
   static ndptr inspect __P((char *));
   static int do_look_ahead __P((int, const char *));
   
   int main __P((int, char *[]));
   
 int  int
 main(argc,argv)  main(argc,argv)
         int argc;          int argc;
Line 225 
Line 229 
         return 0;          return 0;
 }  }
   
 ndptr inspect();  
   
 /*  /*
  * Look ahead (at most MAXCCHARS characters) for `token'.   * Look ahead (at most MAXCCHARS characters) for `token'.
  * (on input `t == token[0]')   * (on input `t == token[0]')
Line 234 
Line 236 
  * Returns 1 if `token' present; copied to output.   * Returns 1 if `token' present; copied to output.
  *         0 if `token' not found; all characters pushed back   *         0 if `token' not found; all characters pushed back
  */   */
 int  static int
 do_look_ahead(t, token)  do_look_ahead(t, token)
         int     t;          int     t;
         char    *token;          const char      *token;
 {  {
         int i;          int i;
   
Line 262 
Line 264 
 /*  /*
  * macro - the work horse..   * macro - the work horse..
  */   */
 void  static void
 macro()  macro()
 {  {
         char token[MAXTOK], chars[2];          char token[MAXTOK], chars[2];
Line 397 
Line 399 
                                         errx(1, "internal stack overflow");                                          errx(1, "internal stack overflow");
   
                                 if (CALTYP == MACRTYPE)                                  if (CALTYP == MACRTYPE)
                                         expand((char **) mstack+fp+1, sp-fp);                                          expand((const char **) mstack+fp+1, sp-fp);
                                 else                                  else
                                         eval((char **) mstack+fp+1, sp-fp, CALTYP);                                          eval((const char **) mstack+fp+1, sp-fp, CALTYP);
   
                                 ep = PREVEP;    /* flush strspace */                                  ep = PREVEP;    /* flush strspace */
                                 sp = PREVSP;    /* previous sp..  */                                  sp = PREVSP;    /* previous sp..  */
Line 430 
Line 432 
  * consider only those starting with _ or A-Za-z. This is a   * consider only those starting with _ or A-Za-z. This is a
  * combo with lookup to speed things up.   * combo with lookup to speed things up.
  */   */
 ndptr  static ndptr
 inspect(tp)  inspect(tp)
         char *tp;          char *tp;
 {  {
Line 461 
Line 463 
  * keyword strings, since we simply use the static pointers   * keyword strings, since we simply use the static pointers
  * within keywrds block.   * within keywrds block.
  */   */
 void  static void
 initkwds()  initkwds()
 {  {
         size_t i;          size_t i;

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