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

Diff for /src/usr.bin/mail/lex.c between version 1.21 and 1.22

version 1.21, 2000/07/06 06:24:21 version 1.22, 2001/01/16 05:36:08
Line 55 
Line 55 
   
 char    *prompt = "& ";  char    *prompt = "& ";
   
   const struct cmd *com;  /* command we are running */
   
 /*  /*
  * Set up editing on the given file name.   * Set up editing on the given file name.
  * If the first character of name is %, we are considered to be   * If the first character of name is %, we are considered to be
Line 297 
Line 299 
 {  {
         char word[LINESIZE];          char word[LINESIZE];
         char *arglist[MAXARGC];          char *arglist[MAXARGC];
         const struct cmd *com = NULL;  
         char *cp, *cp2;          char *cp, *cp2;
         int c, muvec[2];          int c, muvec[2];
         int e = 1;          int e = 1;
   
           com = NULL;
   
         /*          /*
          * Strip the white space away from the beginning           * Strip the white space away from the beginning
          * of the command, then scan out a word, which           * of the command, then scan out a word, which
Line 378 
Line 381 
                 goto out;                  goto out;
         }          }
         switch (com->c_argtype & ~(F|P|I|M|T|W|R)) {          switch (com->c_argtype & ~(F|P|I|M|T|W|R)) {
           case MSGLIST|STRLIST:
                   /*
                    * A message list defaulting to nearest forward
                    * legal message.
                    */
                   if (msgvec == 0) {
                           puts("Illegal use of \"message list\"");
                           break;
                   }
                   /*
                    * remove leading blanks.
                    */
                   while (isspace(*cp))
                           cp++;
   
                   if (isdigit(*cp) || *cp == ':') {
                           if ((c = getmsglist(cp, msgvec, com->c_msgflag)) < 0)
                                   break;
                           /* position to next space - past the message list */
                           while (!isspace(*cp))
                                   cp++;
                           /* position to next non-space */
                           while (isspace(*cp))
                                   cp++;
                   } else {
                           c = 0; /* no message list */
                   }
   
                   if (c  == 0) {
                           *msgvec = first(com->c_msgflag,
                                   com->c_msgmask);
                           msgvec[1] = NULL;
                   }
                   if (*msgvec == NULL) {
                           puts("No applicable messages");
                           break;
                   }
                   /*
                    * Just the straight string, with
                    * leading blanks removed.
                    */
                   while (isspace(*cp))
                           cp++;
   
                   e = (*com->c_func2)(msgvec, cp);
                   break;
   
         case MSGLIST:          case MSGLIST:
                 /*                  /*
                  * A message list defaulting to nearest forward                   * A message list defaulting to nearest forward
Line 614 
Line 664 
         int vec[2], mdot;          int vec[2], mdot;
   
         mdot = newfileinfo(0);          mdot = newfileinfo(0);
         clearnew();  
         vec[0] = mdot;          vec[0] = mdot;
         vec[1] = 0;          vec[1] = 0;
         dot = &message[mdot - 1];          dot = &message[mdot - 1];

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22