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

Diff for /src/usr.bin/mail/cmd3.c between version 1.13 and 1.14

version 1.13, 2000/08/02 04:10:48 version 1.14, 2001/01/16 05:36:08
Line 69 
Line 69 
         cmd[sizeof(cmd) - 1] = '\0';          cmd[sizeof(cmd) - 1] = '\0';
         if (bangexp(cmd, sizeof(cmd)) < 0)          if (bangexp(cmd, sizeof(cmd)) < 0)
                 return(1);                  return(1);
         if ((shell = value("SHELL")) == NULL)          shell = value("SHELL");
                 shell = _PATH_CSHELL;  
         (void)run_command(shell, 0, -1, -1, "-c", cmd, NULL);          (void)run_command(shell, 0, -1, -1, "-c", cmd, NULL);
         (void)signal(SIGINT, sigint);          (void)signal(SIGINT, sigint);
         puts("!");          puts("!");
Line 88 
Line 87 
         sig_t sigint = signal(SIGINT, SIG_IGN);          sig_t sigint = signal(SIGINT, SIG_IGN);
         char *shell;          char *shell;
   
         if ((shell = value("SHELL")) == NULL)          shell = value("SHELL");
                 shell = _PATH_CSHELL;  
         (void)run_command(shell, 0, -1, -1, NULL, NULL, NULL);          (void)run_command(shell, 0, -1, -1, NULL, NULL, NULL);
         (void)signal(SIGINT, sigint);          (void)signal(SIGINT, sigint);
         putchar('\n');          putchar('\n');
Line 154 
Line 152 
 /*  /*
  * Print out a nice help message from some file or another.   * Print out a nice help message from some file or another.
  */   */
   
 int  int
 help(v)  help(v)
         void *v;          void *v;
 {  {
         int c;  
         FILE *f;  
   
         if ((f = Fopen(_PATH_HELP, "r")) == NULL) {          (void)run_command(value("PAGER"), 0, -1, -1, _PATH_HELP, NULL);
                 warn(_PATH_HELP);  
                 return(1);  
         }  
         while ((c = getc(f)) != EOF)  
                 putchar(c);  
         (void)Fclose(f);  
         return(0);          return(0);
 }  }
   
Line 295 
Line 284 
 }  }
   
 /*  /*
    * Mark new the named messages, so that they will be left in the system
    * mailbox as unread.
    */
   int
   marknew(v)
           void *v;
   {
           int *msgvec = v;
           int *ip;
   
           for (ip = msgvec; *ip != NULL; ip++) {
                   dot = &message[*ip-1];
                   dot->m_flag &= ~(MBOX|MREAD|MTOUCH);
                   dot->m_flag |= MNEW|MSTATUS;
           }
           return(0);
   }
   
   /*
  * Preserve the named messages, so that they will be sent   * Preserve the named messages, so that they will be sent
  * back to the system mailbox.   * back to the system mailbox.
  */   */
Line 327 
Line 335 
 unread(v)  unread(v)
         void *v;          void *v;
 {  {
         int     *msgvec = v;          int *msgvec = v;
         int *ip;          int *ip;
   
         for (ip = msgvec; *ip != NULL; ip++) {          for (ip = msgvec; *ip != NULL; ip++) {

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14