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

Diff for /src/usr.bin/mg/grep.c between version 1.18 and 1.19

version 1.18, 2005/10/13 05:24:52 version 1.19, 2005/10/13 20:28:49
Line 218 
Line 218 
         char    *buf;          char    *buf;
         size_t   len;          size_t   len;
         int      ret;          int      ret;
         char    *wdir, cwd[NFILEN];          char    *wdir, cwd[NFILEN];
         char     timestr[NTIME];          char     timestr[NTIME];
         time_t   t;          time_t   t;
   
Line 235 
Line 235 
         if (chdir(path) == -1) {          if (chdir(path) == -1) {
                 ewprintf("Can't change dir to %s", path);                  ewprintf("Can't change dir to %s", path);
                 return (NULL);                  return (NULL);
         }          }
         if ((pipe = popen(command, "r")) == NULL) {          if ((pipe = popen(command, "r")) == NULL) {
                 ewprintf("Problem opening pipe");                  ewprintf("Problem opening pipe");
                 return (NULL);                  return (NULL);
Line 269 
Line 269 
         if (chdir(cwd) == -1) {          if (chdir(cwd) == -1) {
                 ewprintf("Can't change dir back to %s", cwd);                  ewprintf("Can't change dir back to %s", cwd);
                 return (NULL);                  return (NULL);
         }          }
         return (bp);          return (bp);
 }  }
   

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19