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

Diff for /src/usr.bin/mail/cmd2.c between version 1.1 and 1.2

version 1.1, 1995/10/18 08:45:38 version 1.2, 1996/06/11 12:53:33
Line 1 
Line 1 
   /*      $OpenBSD$       */
   /*      $NetBSD: cmd2.c,v 1.5 1996/06/08 19:48:13 christos Exp $        */
   
 /*  /*
  * Copyright (c) 1980, 1993   * Copyright (c) 1980, 1993
  *      The Regents of the University of California.  All rights reserved.   *      The Regents of the University of California.  All rights reserved.
Line 32 
Line 35 
  */   */
   
 #ifndef lint  #ifndef lint
 static char sccsid[] = "from: @(#)cmd2.c        8.1 (Berkeley) 6/6/93";  #if 0
 static char rcsid[] = "$Id$";  static char sccsid[] = "@(#)cmd2.c      8.1 (Berkeley) 6/6/93";
   #else
   static char rcsid[] = "$OpenBSD$";
   #endif
 #endif /* not lint */  #endif /* not lint */
   
 #include "rcv.h"  #include "rcv.h"
Line 45 
Line 51 
  *   *
  * More user commands.   * More user commands.
  */   */
   static int igcomp __P((const void *, const void *));
   
 /*  /*
  * If any arguments were given, go to the next applicable argument   * If any arguments were given, go to the next applicable argument
Line 52 
Line 59 
  * If given as first command with no arguments, print first message.   * If given as first command with no arguments, print first message.
  */   */
 int  int
 next(msgvec)  next(v)
         int *msgvec;          void *v;
 {  {
           int *msgvec = v;
         register struct message *mp;          register struct message *mp;
         register int *ip, *ip2;          register int *ip, *ip2;
         int list[2], mdot;          int list[2], mdot;
Line 131 
Line 139 
  * so we can discard when the user quits.   * so we can discard when the user quits.
  */   */
 int  int
 save(str)  save(v)
         char str[];          void *v;
 {  {
           char *str = v;
   
         return save1(str, 1, "save", saveignore);          return save1(str, 1, "save", saveignore);
 }  }
Line 142 
Line 151 
  * Copy a message to a file without affected its saved-ness   * Copy a message to a file without affected its saved-ness
  */   */
 int  int
 copycmd(str)  copycmd(v)
         char str[];          void *v;
 {  {
           char *str = v;
   
         return save1(str, 0, "copy", saveignore);          return save1(str, 0, "copy", saveignore);
 }  }
Line 215 
Line 225 
  * file name, minus header and trailing blank line.   * file name, minus header and trailing blank line.
  */   */
 int  int
 swrite(str)  swrite(v)
         char str[];          void *v;
 {  {
           char *str = v;
   
         return save1(str, 1, "write", ignoreall);          return save1(str, 1, "write", ignoreall);
 }  }
Line 270 
Line 281 
  * Delete messages.   * Delete messages.
  */   */
 int  int
 delete(msgvec)  delete(v)
         int msgvec[];          void *v;
 {  {
           int *msgvec = v;
         delm(msgvec);          delm(msgvec);
         return 0;          return 0;
 }  }
Line 281 
Line 293 
  * Delete messages, then type the new dot.   * Delete messages, then type the new dot.
  */   */
 int  int
 deltype(msgvec)  deltype(v)
         int msgvec[];          void *v;
 {  {
           int *msgvec = v;
         int list[2];          int list[2];
         int lastdot;          int lastdot;
   
Line 346 
Line 359 
  * Undelete the indicated messages.   * Undelete the indicated messages.
  */   */
 int  int
 undeletecmd(msgvec)  undeletecmd(v)
         int *msgvec;          void *v;
 {  {
           int *msgvec = v;
         register struct message *mp;          register struct message *mp;
         register *ip;          register *ip;
   
Line 365 
Line 379 
  * Interactively dump core on "core"   * Interactively dump core on "core"
  */   */
 int  int
 core()  core(v)
           void *v;
 {  {
         int pid;          int pid;
         extern union wait wait_status;          extern union wait wait_status;
Line 392 
Line 407 
  * Clobber as many bytes of stack as the user requests.   * Clobber as many bytes of stack as the user requests.
  */   */
 int  int
 clobber(argv)  clobber(v)
         char **argv;          void *v;
 {  {
           char **argv = v;
         register int times;          register int times;
   
         if (argv[0] == 0)          if (argv[0] == 0)
Line 427 
Line 443 
  * If no arguments, print the current list of retained fields.   * If no arguments, print the current list of retained fields.
  */   */
 int  int
 retfield(list)  retfield(v)
         char *list[];          void *v;
 {  {
           char **list = v;
   
         return ignore1(list, ignore + 1, "retained");          return ignore1(list, ignore + 1, "retained");
 }  }
Line 439 
Line 456 
  * If no arguments, print the current list of ignored fields.   * If no arguments, print the current list of ignored fields.
  */   */
 int  int
 igfield(list)  igfield(v)
         char *list[];          void *v;
 {  {
           char **list = v;
   
         return ignore1(list, ignore, "ignored");          return ignore1(list, ignore, "ignored");
 }  }
   
 int  int
 saveretfield(list)  saveretfield(v)
         char *list[];          void *v;
 {  {
           char **list = v;
   
         return ignore1(list, saveignore + 1, "retained");          return ignore1(list, saveignore + 1, "retained");
 }  }
   
 int  int
 saveigfield(list)  saveigfield(v)
         char *list[];          void *v;
 {  {
           char **list = v;
   
         return ignore1(list, saveignore, "ignored");          return ignore1(list, saveignore, "ignored");
 }  }
Line 502 
Line 522 
         register int h;          register int h;
         struct ignore *igp;          struct ignore *igp;
         char **ap, **ring;          char **ap, **ring;
         int igcomp();  
   
         if (tab->i_count == 0) {          if (tab->i_count == 0) {
                 printf("No fields currently being %s.\n", which);                  printf("No fields currently being %s.\n", which);
Line 523 
Line 542 
 /*  /*
  * Compare two names for sorting ignored field list.   * Compare two names for sorting ignored field list.
  */   */
 int  static int
 igcomp(l, r)  igcomp(l, r)
         const void *l, *r;          const void *l, *r;
 {  {

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