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

Diff for /src/usr.bin/sed/process.c between version 1.2 and 1.3

version 1.2, 1996/06/26 05:39:08 version 1.3, 1997/09/11 11:21:07
Line 445 
Line 445 
                          */                           */
                         if ((f = fopen(appends[i].s, "r")) == NULL)                          if ((f = fopen(appends[i].s, "r")) == NULL)
                                 break;                                  break;
                         while (count = fread(buf, sizeof(char), sizeof(buf), f))                          while ((count = fread(buf, sizeof(char), sizeof(buf), f)))
                                 (void)fwrite(buf, sizeof(char), count, stdout);                                  (void)fwrite(buf, sizeof(char), count, stdout);
                         (void)fclose(f);                          (void)fclose(f);
                         break;                          break;
Line 465 
Line 465 
         static int termwidth = -1;          static int termwidth = -1;
   
         if (termwidth == -1)          if (termwidth == -1)
                 if (p = getenv("COLUMNS"))                  if ((p = getenv("COLUMNS")))
                         termwidth = atoi(p);                          termwidth = atoi(p);
                 else if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) == 0 &&                  else if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) == 0 &&
                     win.ws_col > 0)                      win.ws_col > 0)
Line 484 
Line 484 
                 } else {                  } else {
                         escapes = "\\\a\b\f\n\r\t\v";                          escapes = "\\\a\b\f\n\r\t\v";
                         (void)putchar('\\');                          (void)putchar('\\');
                         if (p = strchr(escapes, *s)) {                          if ((p = strchr(escapes, *s))) {
                                 (void)putchar("\\abfnrtv"[p - escapes]);                                  (void)putchar("\\abfnrtv"[p - escapes]);
                                 count += 2;                                  count += 2;
                         } else {                          } else {

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