/[imapfilter]/imapfilter/imapfilter.c
ViewVC logotype

Diff of /imapfilter/imapfilter.c

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

revision 1.9 by lefcha, Sun Aug 26 12:26:59 2001 UTC revision 1.10 by lefcha, Sun Aug 26 19:58:54 2001 UTC
# Line 14  Line 14 
14  extern int sock;  extern int sock;
15  extern account_t *accounts;  extern account_t *accounts;
16    
17  int options;                    /* Program options. */  unsigned int options;           /* Program options. */
18  char logfile[PATH_MAX];         /* Log file. */  char logfile[PATH_MAX];         /* Log file. */
19    
20    
# Line 30  int main(int argc, char **argv) Line 30  int main(int argc, char **argv)
30      options = OPT_DETAILS_NORMAL;      options = OPT_DETAILS_NORMAL;
31      logfile[0] = 0;      logfile[0] = 0;
32    
33      while ((c = getopt(argc, argv, "c:hl:qstv")) != -1) {      while ((c = getopt(argc, argv, "c:hl:qtv")) != -1) {
34          switch (c) {          switch (c) {
35          case 'c':          case 'c':
36              cfg = optarg;              cfg = optarg;
# Line 46  int main(int argc, char **argv) Line 46  int main(int argc, char **argv)
46              options &= OPT_DETAILS_CLEAR;              options &= OPT_DETAILS_CLEAR;
47              options |= OPT_DETAILS_QUITE;              options |= OPT_DETAILS_QUITE;
48              break;              break;
         case 's':  
             options |= OPT_SHOW_HEADERS;  
             break;  
49          case 't':          case 't':
50              options |= OPT_TEST_MODE;              options |= OPT_TEST_MODE;
51                options |= OPT_TEST_MODE_STICKY;    /* Override config
52                                                       file's TEST_MODE. */
53              break;              break;
54          case 'v':          case 'v':
55              options &= OPT_DETAILS_CLEAR;              options &= OPT_DETAILS_CLEAR;
# Line 106  void apply_filters(void) Line 105  void apply_filters(void)
105      char res[SEARCH_BUF];      char res[SEARCH_BUF];
106    
107      if (!imap_search(res) && res[0]) {      if (!imap_search(res) && res[0]) {
108          delete_messages(res);          del_messages(res);
109          if (!(options & OPT_TEST_MODE))          if (!(options & OPT_TEST_MODE))
110              imap_expunge();              imap_expunge();
111      }      }
# Line 119  void apply_filters(void) Line 118  void apply_filters(void)
118  void usage(void)  void usage(void)
119  {  {
120      fprintf(stderr,      fprintf(stderr,
121              "usage: imapfilter [-hqstv] [-c configfile] [-l logfile]\n");              "usage: imapfilter [-hqtv] [-c configfile] [-l logfile]\n");
122  }  }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26