/[mailutils]/mailutils/mail/if.c
ViewVC logotype

Diff of /mailutils/mail/if.c

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

revision 1.6 by alainm, Sat Sep 15 20:50:42 2001 UTC revision 1.7 by gray, Wed Aug 7 15:29:24 2002 UTC
# Line 80  _cond_pop() Line 80  _cond_pop()
80  int  int
81  mail_if (int argc, char **argv)  mail_if (int argc, char **argv)
82  {  {
83    struct mail_env_entry *mode;    char *mode;
84    int cond;    int cond;
85    
86    if (argc != 2)    if (argc != 2)
# Line 95  mail_if (int argc, char **argv) Line 95  mail_if (int argc, char **argv)
95        return 1;        return 1;
96      }      }
97    
98    mode = util_find_env("mode");    if (util_getenv (&mode, "mode", Mail_env_string, 1))
99    if (!mode)      exit (EXIT_FAILURE);
     {  
       exit (EXIT_FAILURE);  
     }  
100    
101    if (if_cond() == 0)    if (if_cond() == 0)
102      /* Propagate negative condition */      /* Propagate negative condition */
# Line 109  mail_if (int argc, char **argv) Line 106  mail_if (int argc, char **argv)
106        switch (argv[1][0])        switch (argv[1][0])
107          {          {
108          case 's': /* Send mode */          case 's': /* Send mode */
109            cond = strcmp(mode->value, "send") == 0;            cond = strcmp(mode, "send") == 0;
110            break;            break;
111          case 'r': /* Read mode */          case 'r': /* Read mode */
112            cond = strcmp(mode->value, "send") != 0;            cond = strcmp(mode, "send") != 0;
113            break;            break;
114          case 't': /* Reading from a terminal */          case 't': /* Reading from a terminal */
115            cond = interactive;            cond = interactive;

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

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