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

Diff for /src/usr.bin/mg/interpreter.c between version 1.3 and 1.4

version 1.3, 2019/07/19 16:00:08 version 1.4, 2019/07/20 06:00:16
Line 20 
Line 20 
  * like:   * like:
  *   *
  * 1. Give multiple arguments to a function that usually would accept only one:   * 1. Give multiple arguments to a function that usually would accept only one:
  * (find-fine a.txt b.txt. c.txt)   * (find-file a.txt b.txt. c.txt)
  *   *
  * 2. Define a list:   * 2. Define a list:
  * (define myfiles(list d.txt e.txt))   * (define myfiles(list d.txt e.txt))
Line 172 
Line 172 
                                 excbuf[0] = '\0';                                  excbuf[0] = '\0';
                                 /* Is arg a var? */                                  /* Is arg a var? */
                                 if (!inlist) {                                  if (!inlist) {
                                         if ((contbuf = strndup(endp, BUFSIZE))  
                                             == NULL)  
                                                 return(FALSE);  
                                         sizof = sizeof(tmpbuf);                                          sizof = sizeof(tmpbuf);
                                         t = tmpbuf;                                          t = tmpbuf;
                                         if (isvar(&argp, &t, sizof)) {                                          if (isvar(&argp, &t, sizof)) {
                                                   if ((contbuf = strndup(endp,
                                                       BUFSIZE)) == NULL)
                                                           return(FALSE);
                                                 *p = ' ';                                                  *p = ' ';
                                                 (void)(strlcpy(argbuf, tmpbuf,                                                  (void)(strlcpy(argbuf, tmpbuf,
                                                     sizof) >= sizof);                                                      sizof) >= sizof);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4