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

Diff of /imapfilter/imapfilter.c

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

revision 1.61 by lefcha, Mon Feb 9 18:23:49 2004 UTC revision 1.62 by lefcha, Mon Feb 9 19:56:42 2004 UTC
# Line 27  extern filter_t *filters; Line 27  extern filter_t *filters;
27  extern buffer_t ibuf, obuf;  extern buffer_t ibuf, obuf;
28    
29  unsigned int options;           /* Program options. */  unsigned int options;           /* Program options. */
30    int verbosity;                  /* Program verbosity level (-2..2). */
31  unsigned int flags = 0;         /* Program flags. */  unsigned int flags = 0;         /* Program flags. */
32  unsigned int interval = 0;      /* Poll at the specified interval. */  unsigned int interval = 0;      /* Poll at the specified interval. */
33  conn_t connpri, connaux;        /* Primary and auxiliary IMAP connection. */  conn_t connpri, connaux;        /* Primary and auxiliary IMAP connection. */
# Line 56  main(int argc, char *argv[]) Line 57  main(int argc, char *argv[])
57          setlocale(LC_ALL, "");          setlocale(LC_ALL, "");
58    
59          home = getenv("HOME");          home = getenv("HOME");
60          options = (OPTION_DETAILS_NORMAL | OPTION_NAMESPACE | OPTION_PEEK |          options = (OPTION_NAMESPACE | OPTION_PEEK);
61              OPTION_PERMISSIONS);          verbosity = 0;
62          *charset = 0;          *charset = 0;
63          *logfile = 0;          *logfile = 0;
64          conffile = NULL;          conffile = NULL;
# Line 67  main(int argc, char *argv[]) Line 68  main(int argc, char *argv[])
68  #ifdef ENCRYPTED_PASSWORDS  #ifdef ENCRYPTED_PASSWORDS
69                      "p"                      "p"
70  #endif  #endif
71                      "qvVw")) != -1) {                      "qvV")) != -1) {
72                  switch (c) {                  switch (c) {
73                  case 'c':                  case 'c':
74                          conffile = optarg;                          conffile = optarg;
# Line 98  main(int argc, char *argv[]) Line 99  main(int argc, char *argv[])
99                          break;                          break;
100  #endif  #endif
101                  case 'q':                  case 'q':
102                          options &= ~(OPTION_DETAILS_QUIET |                          if (verbosity > -2)
103                              OPTION_DETAILS_NORMAL | OPTION_DETAILS_VERBOSE);                                  verbosity--;
                         options |= OPTION_DETAILS_QUIET;  
104                          break;                          break;
105                  case 'v':                  case 'v':
106                          options &= ~(OPTION_DETAILS_QUIET |                          if (verbosity < 2)
107                              OPTION_DETAILS_NORMAL | OPTION_DETAILS_VERBOSE);                                  verbosity++;
                         options |= OPTION_DETAILS_VERBOSE;  
108                          break;                          break;
109                  case 'V':                  case 'V':
110                          version();                          version();
111                          exit(ERROR_UNDEFINED);                          exit(ERROR_UNDEFINED);
112                          break;                          break;
                 case 'w':  
                         options &= ~(OPTION_PERMISSIONS);  
                         break;  
113                  default:                  default:
114                          usage();                          usage();
115                          exit(ERROR_UNDEFINED);                          exit(ERROR_UNDEFINED);
# Line 154  main(int argc, char *argv[]) Line 150  main(int argc, char *argv[])
150          init_buffer(&ibuf);          init_buffer(&ibuf);
151          init_buffer(&obuf);          init_buffer(&obuf);
152    
153          if (options & OPTION_DAEMON_MODE) {          if (options & OPTION_DAEMON_MODE)
154                  options &= ~(OPTION_DETAILS_QUIET |                  verbosity = -2;
155                      OPTION_DETAILS_NORMAL | OPTION_DETAILS_VERBOSE);  
                 options |= OPTION_DETAILS_QUIET;  
         }  
156          do {          do {
157                  for (ca = accounts; ca != NULL; ca = ca->next) {                  for (ca = accounts; ca != NULL; ca = ca->next) {
158    
# Line 303  usage(void) Line 297  usage(void)
297  #ifdef ENCRYPTED_PASSWORDS  #ifdef ENCRYPTED_PASSWORDS
298              "p"              "p"
299  #endif  #endif
300              "qvVw] [-c configfile] [-d interval] [-l logfile]\n");              "qvV] [-c configfile] [-d interval] [-l logfile]\n");
301  }  }
302    
303    

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.62

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26