[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.6 and 1.7

version 1.6, 1997/12/10 20:24:15 version 1.7, 1997/12/20 15:39:14
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
 /*      $NetBSD: main.c,v 1.11 1996/01/13 23:25:26 pk Exp $     */  /*      $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $    */
   
 /*-  /*-
  * Copyright (c) 1989, 1993   * Copyright (c) 1989, 1993
Line 280 
Line 280 
  */   */
 void  void
 macro() {  macro() {
         char token[MAXTOK];          char token[MAXTOK], chars[2];
         register char *s;          register char *s;
         register int t, l;          register int t, l;
         register ndptr p;          register ndptr p;
Line 331 
Line 331 
                         continue;                          continue;
                 }                  }
         /*          /*
          * non-alpha single-char token seen..           * non-alpha token possibly seen..
          * [the order of else if .. stmts is important.]           * [the order of else if .. stmts is important.]
          */           */
                 else if (LOOK_AHEAD(t,lquote)) {        /* strip quotes */                  else if (LOOK_AHEAD(t,lquote)) {        /* strip quotes */
                         nlpar = 1;                          nlpar = 1;
                         do {                          do {
   
                                 l = gpbc();                                  l = gpbc();
                                 if (LOOK_AHEAD(l,rquote))                                  if (LOOK_AHEAD(l,rquote)) {
                                         nlpar--;                                          nlpar--;
                                 else if (LOOK_AHEAD(l,lquote))                                          s = rquote;
                                   } else if (LOOK_AHEAD(l,lquote)) {
                                         nlpar++;                                          nlpar++;
                                 else if (l == EOF)                                          s = lquote;
                                   } else if (l == EOF)
                                         oops("missing right quote", "");                                          oops("missing right quote", "");
                                   else {
                                           chars[0] = l;
                                           chars[1] = '\0';
                                           s = chars;
                                   }
                                 if (nlpar > 0) {                                  if (nlpar > 0) {
                                         if (sp < 0)                                          if (sp < 0)
                                                 putc(l, active);                                                  while (*s)
                                                           putc(*s++, active);
                                         else                                          else
                                                 chrsave(l);                                                  while (*s)
                                                           chrsave(*s++);
                                 }                                  }
                         }                          }
                         while (nlpar != 0);                          while (nlpar != 0);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7