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

Diff for /src/usr.bin/m4/eval.c between version 1.1 and 1.2

version 1.1, 1995/10/18 08:45:35 version 1.2, 1996/01/15 01:12:11
Line 1 
Line 1 
 /*      $NetBSD: eval.c,v 1.4 1995/09/28 05:37:28 tls Exp $      */  /*      $NetBSD: eval.c,v 1.5 1996/01/13 23:25:23 pk Exp $      */
   
 /*  /*
  * Copyright (c) 1989, 1993   * Copyright (c) 1989, 1993
Line 40 
Line 40 
 #if 0  #if 0
 static char sccsid[] = "@(#)eval.c      8.2 (Berkeley) 4/27/95";  static char sccsid[] = "@(#)eval.c      8.2 (Berkeley) 4/27/95";
 #else  #else
 static char rcsid[] = "$NetBSD: eval.c,v 1.4 1995/09/28 05:37:28 tls Exp $";  static char rcsid[] = "$NetBSD: eval.c,v 1.5 1996/01/13 23:25:23 pk Exp $";
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 236 
Line 236 
          * argv[2])           * argv[2])
          */           */
                 if (argc > 3) {                  if (argc > 3) {
                           int k;
                         for (n = argc - 1; n > 3; n--) {                          for (n = argc - 1; n > 3; n--) {
                                 putback(rquote);                                  k = strlen(rquote);
                                   while (k--)
                                           putback(rquote[k]);
                                 pbstr(argv[n]);                                  pbstr(argv[n]);
                                 putback(lquote);                                  k = strlen(lquote);
                                   while (k--)
                                           putback(lquote[k]);
                                 putback(',');                                  putback(',');
                         }                          }
                         putback(rquote);                          k = strlen(rquote);
                           while (k--)
                                   putback(rquote[k]);
                         pbstr(argv[3]);                          pbstr(argv[3]);
                         putback(lquote);                          k = strlen(lquote);
                           while (k--)
                                   putback(lquote[k]);
                 }                  }
                 break;                  break;
   
Line 473 
Line 482 
         register ndptr p;          register ndptr p;
   
         if ((p = lookup(name)) != nil && p->defn != null) {          if ((p = lookup(name)) != nil && p->defn != null) {
                 putback(rquote);                  int n = strlen(rquote);
                   while (n--)
                           putback(rquote[n]);
                 pbstr(p->defn);                  pbstr(p->defn);
                 putback(lquote);                  n = strlen(lquote);
                   while (n--)
                           putback(lquote[n]);
         }          }
 }  }
   
Line 605 
Line 618 
 {  {
         if (argc > 2) {          if (argc > 2) {
                 if (*argv[2])                  if (*argv[2])
                         lquote = *argv[2];                          strncpy(lquote, argv[2], MAXCCHARS);
                 if (argc > 3) {                  if (argc > 3) {
                         if (*argv[3])                          if (*argv[3])
                                 rquote = *argv[3];                                  strncpy(rquote, argv[3], MAXCCHARS);
                 }                  }
                 else                  else
                         rquote = lquote;                          strcpy(rquote, lquote);
         }          }
         else {          else {
                 lquote = LQUOTE;                  lquote[0] = LQUOTE, lquote[1] = '\0';
                 rquote = RQUOTE;                  rquote[0] = RQUOTE, rquote[1] = '\0';
         }          }
 }  }
   
Line 629 
Line 642 
 {  {
         if (argc > 2) {          if (argc > 2) {
                 if (*argv[2])                  if (*argv[2])
                         scommt = *argv[2];                          strncpy(scommt, argv[2], MAXCCHARS);
                 if (argc > 3) {                  if (argc > 3) {
                         if (*argv[3])                          if (*argv[3])
                                 ecommt = *argv[3];                                  strncpy(ecommt, argv[3], MAXCCHARS);
                 }                  }
                 else                  else
                         ecommt = ECOMMT;                          ecommt[0] = ECOMMT, ecommt[1] = '\0';
         }          }
         else {          else {
                 scommt = SCOMMT;                  scommt[0] = SCOMMT, scommt[1] = '\0';
                 ecommt = ECOMMT;                  ecommt[0] = ECOMMT, ecommt[1] = '\0';
         }          }
 }  }
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2