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

Diff for /src/usr.bin/mail/main.c between version 1.6 and 1.7

version 1.6, 1997/07/13 23:54:00 version 1.7, 1997/07/14 00:24:28
Line 59 
Line 59 
  * Startup -- interface with user.   * Startup -- interface with user.
  */   */
   
 jmp_buf hdrjmp;  sigjmp_buf      hdrjmp;
   
 int  int
 main(argc, argv)  main(argc, argv)
Line 90 
Line 90 
          * of users to mail to.  Argp will be set to point to the           * of users to mail to.  Argp will be set to point to the
          * first of these users.           * first of these users.
          */           */
         ef = NOSTR;          ef = NULL;
         to = NIL;          to = NIL;
         cc = NIL;          cc = NIL;
         bcc = NIL;          bcc = NIL;
         smopts = NIL;          smopts = NIL;
         subject = NOSTR;          subject = NULL;
         while ((i = getopt(argc, argv, "INT:b:c:dfins:u:v")) != -1) {          while ((i = getopt(argc, argv, "INT:b:c:dfins:u:v")) != -1) {
                 switch (i) {                  switch (i) {
                 case 'T':                  case 'T':
Line 199 
Line 199 
         /*          /*
          * Check for inconsistent arguments.           * Check for inconsistent arguments.
          */           */
         if (to == NIL && (subject != NOSTR || cc != NIL || bcc != NIL))          if (to == NIL && (subject != NULL || cc != NIL || bcc != NIL))
                 errx(1, "You must specify direct recipients with -s, -c, or -b");                  errx(1, "You must specify direct recipients with -s, -c, or -b");
         if (ef != NOSTR && to != NIL)          if (ef != NULL && to != NIL)
                 errx(1, "Cannot give -f and people to send to");                  errx(1, "Cannot give -f and people to send to");
         tinit();          tinit();
         setscreensize();          setscreensize();
Line 229 
Line 229 
          * Decide whether we are editing a mailbox or reading           * Decide whether we are editing a mailbox or reading
          * the system mailbox, and open up the right stuff.           * the system mailbox, and open up the right stuff.
          */           */
         if (ef == NOSTR)          if (ef == NULL)
                 ef = "%";                  ef = "%";
         if (setfile(ef) < 0)          if (setfile(ef) < 0)
                 exit(1);                /* error already reported */                  exit(1);                /* error already reported */
         if (setjmp(hdrjmp) == 0) {          if (sigsetjmp(hdrjmp, 1) == 0) {
                 extern char *version;                  extern char *version;
   
                 if ((prevint = signal(SIGINT, SIG_IGN)) != SIG_IGN)                  if ((prevint = signal(SIGINT, SIG_IGN)) != SIG_IGN)
                         signal(SIGINT, hdrstop);                          signal(SIGINT, hdrstop);
                 if (value("quiet") == NOSTR)                  if (value("quiet") == NULL)
                         printf("Mail version %s.  Type ? for help.\n",                          printf("Mail version %s.  Type ? for help.\n",
                                 version);                                  version);
                 announce();                  announce();
Line 263 
Line 263 
   
         fflush(stdout);          fflush(stdout);
         fputs("\nInterrupt\n", stderr);          fputs("\nInterrupt\n", stderr);
         longjmp(hdrjmp, 1);          siglongjmp(hdrjmp, 1);
 }  }
   
 /*  /*

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7