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

Diff for /src/usr.bin/awk/b.c between version 1.46 and 1.47

version 1.46, 2023/11/15 18:48:13 version 1.47, 2023/11/15 18:56:53
Line 905 
Line 905 
                  * (except for EOF's nullbyte, if present) and null                   * (except for EOF's nullbyte, if present) and null
                  * terminate the buffer.                   * terminate the buffer.
                  */                   */
                 do {                  for (; r.len > 0; r.len--)
                         int ii;                          if (buf[--k] && ungetc(buf[k], f) == EOF)
                         for (ii = r.len; ii > 0; ii--)                                  FATAL("unable to ungetc '%c'", buf[k]);
                                 if (buf[--k] && ungetc(buf[k], f) == EOF)                  buf[k-patlen] = '\0';
                                         FATAL("unable to ungetc '%c'", buf[k]);  
                 } while (k > i + patlen);  
                 buf[k] = '\0';  
                 return true;                  return true;
         }          }
         else          else

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47