/[nmh]/nmh/uip/anno.c
ViewVC logotype

Diff of /nmh/uip/anno.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by jon, Mon Aug 19 20:50:42 2002 UTC revision 1.6 by jon, Wed Dec 7 21:25:47 2005 UTC
# Line 81  static struct swit switches[] = { Line 81  static struct swit switches[] = {
81      { "number", 2 },      { "number", 2 },
82  #define APPENDSW                12  #define APPENDSW                12
83      { "append", 1 },      { "append", 1 },
84    #define PRESERVESW              13
85        { "preserve", 1 },
86    #define NOPRESERVESW            14
87        { "nopreserve", 3 },
88      { NULL, 0 }      { NULL, 0 }
89  };  };
90    
# Line 100  main (int argc, char **argv) Line 104  main (int argc, char **argv)
104      char **argp, **arguments, **msgs;      char **argp, **arguments, **msgs;
105      struct msgs *mp;      struct msgs *mp;
106      int         append = 0;             /* append annotations instead of default prepend */      int         append = 0;             /* append annotations instead of default prepend */
107      int         delete = -1;            /* delete header element if set */      int         delete = -2;            /* delete header element if set */
108      char        *draft = (char *)0;     /* draft file name */      char        *draft = (char *)0;     /* draft file name */
109      int         isdf = 0;               /* return needed for m_draft() */      int         isdf = 0;               /* return needed for m_draft() */
110      int         list = 0;               /* list header elements if set */      int         list = 0;               /* list header elements if set */
# Line 190  main (int argc, char **argv) Line 194  main (int argc, char **argv)
194    
195                      if (argp - arguments == argc - 1 || **argp == '-')                      if (argp - arguments == argc - 1 || **argp == '-')
196                          number = 1;                          number = 1;
197                        
198                        else {
199                            if (strcmp(*argp, "all") == 0)
200                                number = -1;
201    
202                      else if (!(number = atoi(*argp++)))                          else if (!(number = atoi(*argp)))
203                          adios (NULL, "missing argument to %s", argp[-2]);                              adios (NULL, "missing argument to %s", argp[-2]);
204    
205                            argp++;
206                        }
207    
208                      delete = number;                      delete = number;
209                      continue;                      continue;
# Line 200  main (int argc, char **argv) Line 211  main (int argc, char **argv)
211                  case APPENDSW:          /* append annotations instead of default prepend */                  case APPENDSW:          /* append annotations instead of default prepend */
212                      append = 1;                      append = 1;
213                      continue;                      continue;
214    
215                    case PRESERVESW:        /* preserve access and modification times on annotated message */
216                        annopreserve(1);
217                        continue;
218    
219                    case NOPRESERVESW:      /* don't preserve access and modification times on annotated message (default) */
220                        annopreserve(0);
221                        continue;
222              }              }
223          }          }
224          if (*cp == '+' || *cp == '@') {          if (*cp == '+' || *cp == '@') {

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

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26