[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.1 and 1.2

version 1.1, 2001/05/24 10:58:34 version 1.2, 2001/11/25 07:34:17
Line 77 
Line 77 
         BUFFER *bp;          BUFFER *bp;
         MGWIN *wp;          MGWIN *wp;
   
         strcpy(prompt, "grep -n ");          strlcpy(prompt, "grep -n ", sizeof prompt);
         if (eread("Run grep: ", prompt, NFILEN, EFDEF|EFNEW|EFCR) == ABORT)          if (eread("Run grep: ", prompt, NFILEN, EFDEF|EFNEW|EFCR) == ABORT)
                 return ABORT;                  return ABORT;
   
         sprintf(command, "%s /dev/null", prompt);          snprintf(command, sizeof command, "%s /dev/null", prompt);
   
         if ((bp = compile_mode("*grep*", command)) == NULL)          if ((bp = compile_mode("*grep*", command)) == NULL)
                 return FALSE;                  return FALSE;
Line 104 
Line 104 
         if (eread("Compile command: ", prompt, NFILEN, EFDEF|EFNEW|EFCR) == ABORT)          if (eread("Compile command: ", prompt, NFILEN, EFDEF|EFNEW|EFCR) == ABORT)
                 return ABORT;                  return ABORT;
   
         sprintf(command, "%s 2>&1", prompt);          snprintf(command, sizeof command, "%s 2>&1", prompt);
   
         if ((bp = compile_mode("*compile*", command)) == NULL)          if ((bp = compile_mode("*compile*", command)) == NULL)
                 return FALSE;                  return FALSE;
Line 127 
Line 127 
         if (eread("Run gid (with args): ", prompt, NFILEN, EFNEW|EFCR) == ABORT)          if (eread("Run gid (with args): ", prompt, NFILEN, EFNEW|EFCR) == ABORT)
                 return ABORT;                  return ABORT;
   
         sprintf(command, "gid %s", prompt);          snprintf(command, sizeof command, "gid %s", prompt);
   
         if ((bp = compile_mode("*gid*", command)) == NULL)          if ((bp = compile_mode("*gid*", command)) == NULL)
                 return FALSE;                  return FALSE;

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