diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-07-24 22:13:59 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-07-24 22:13:59 -0600 |
commit | 9306e227fc7b1b096d4a58f8c06da66603a50a6a (patch) | |
tree | 0f4089b0487bb8d6514fcfb79fdd352ebcd527a9 /imap/src/mailutil | |
parent | 28063ac494a640111f4483e85f968ee45b4213de (diff) | |
download | alpine-9306e227fc7b1b096d4a58f8c06da66603a50a6a.tar.xz |
* new version 2.20.9.
* Add command line argument -smimedir, which allows to specify
the default path for a directory that contains the public, private,
and ca directories. This is useful in case a user has a backup of
old certificates that cannot be installed in the ~/.alpine-smime
dir.
* Update to alpine man page to include documentation on missing command
line options such as -nowrite_password_cache, -passfile, -pwdcertdir,
and -smimedir.
* Various changes in the code to quell some compiler issued warnings in
Mac OSX. Reported by Joe St Sauver. This includes the removing
deprecated ldap functions from the code and the test in the configure
script. The switch to not deprecated functions is done by the use of
the belvar structure, which is not completely appropriate for what we
are doing, but it is sufficient for our needs. The berval structure
is more appropriate for binary data, but it works well with string
data, which is what we need.
* Various changes in the code to quell some warnings issued by clang
3.5.
Diffstat (limited to 'imap/src/mailutil')
-rw-r--r-- | imap/src/mailutil/mailutil.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/imap/src/mailutil/mailutil.c b/imap/src/mailutil/mailutil.c index cb62290a..2966a59f 100644 --- a/imap/src/mailutil/mailutil.c +++ b/imap/src/mailutil/mailutil.c @@ -284,8 +284,8 @@ int main (int argc,char *argv[]) else if ((i = !strcmp (cmd,"move")) || !strcmp (cmd,"copy")) { if (!src || !dst || merge) printf (usage3,pgm,cmd,usgcpymov,stdsw); - else if (source = mail_open (NIL,src,((i || rwcopyp) ? NIL : OP_READONLY) | - (debugp ? OP_DEBUG : NIL))) { + else if ((source = mail_open (NIL,src,((i || rwcopyp) ? NIL : OP_READONLY) | + (debugp ? OP_DEBUG : NIL))) != NULL) { dest = NIL; /* open destination stream if network */ if ((*dst != '{') || (dest = mail_open (NIL,dst,OP_HALFOPEN | (debugp ? OP_DEBUG : NIL)))) { @@ -295,8 +295,8 @@ int main (int argc,char *argv[]) } else if ((i = !strcmp (cmd,"appenddelete")) || !strcmp (cmd,"append")) { if (!src || !dst || merge) printf (usage3,pgm,cmd,usgappdel,stdsw); - else if (source = mail_open (NIL,src,((i || rwcopyp) ? NIL : OP_READONLY) | - (debugp ? OP_DEBUG : NIL))) { + else if ((source = mail_open (NIL,src,((i || rwcopyp) ? NIL : OP_READONLY) | + (debugp ? OP_DEBUG : NIL))) != NULL) { dest = NIL; /* open destination stream if network */ if ((*dst != '{') || (dest = mail_open (NIL,dst,OP_HALFOPEN | (debugp ? OP_DEBUG : NIL)))) { @@ -376,7 +376,7 @@ int main (int argc,char *argv[]) rewind (f); /* read back mailbox names */ for (retcode = 0; !retcode && (fgets (tmp,MAILTMPLEN-1,f)); ) { - if (t = strchr (tmp+1,'\n')) *t = '\0'; + if ((t = strchr (tmp+1,'\n')) != NULL) *t = '\0'; for (t = mbx,t1 = dest ? dest->mailbox : "",c = NIL; (c != '}') && *t1; *t++ = c= *t1++); for (t1 = dp; *t1; *t++ = *t1++); @@ -384,7 +384,7 @@ int main (int argc,char *argv[]) t1 = source ? (strchr (tmp+1,'}') + 1) : tmp + 1; /* src and mbx have different delimiters? */ if (ddelim && (ddelim != tmp[0])) - while (c = *t1++) { /* swap delimiters then */ + while ((c = *t1++) != '\0') { /* swap delimiters then */ if (c == ddelim) c = tmp[0] ? tmp[0] : 'x'; else if (c == tmp[0]) c = ddelim; *t++ = c; @@ -396,8 +396,8 @@ int main (int argc,char *argv[]) printf ("Copying %s\n => %s\n",tmp+1,mbx); fflush (stdout); } - if (source = mail_open (source,tmp+1,(debugp ? OP_DEBUG : NIL) | - (rwcopyp ? NIL : OP_READONLY))) { + if ((source = mail_open (source,tmp+1,(debugp ? OP_DEBUG : NIL) | + (rwcopyp ? NIL : OP_READONLY))) != NULL) { if (!mbxcopy (source,dest,mbx,T,NIL,merge)) retcode = 1; if (source->dtb->flags & DR_LOCAL) source = mail_close (source); } @@ -595,7 +595,7 @@ int mbxcopy (MAILSTREAM *source,MAILSTREAM *dest,char *dst,int create,int del, fputs ("alternative name: ",stdout); fflush (stdout); fgets (tmp,MAILTMPLEN-1,stdin); - if (s = strchr (tmp,'\n')) *s = '\0'; + if ((s = strchr (tmp,'\n')) != NULL) *s = '\0'; } if (ndst) fs_give ((void **) &ndst); ndst = cpystr (tmp); @@ -624,7 +624,7 @@ int mbxcopy (MAILSTREAM *source,MAILSTREAM *dest,char *dst,int create,int del, char *tail = "\\Deleted)"; char *flags = (char *) fs_get (1 + len + strlen (tail) + 1); s = flags; *s++ = '('; - for (i = 0; i < NUSERFLAGS; ++i) if (t = source->user_flags[i]) { + for (i = 0; i < NUSERFLAGS; ++i) if ((t = source->user_flags[i]) != NULL) { while (*t) *s++ = *t++; *s++ = ' '; } @@ -895,7 +895,7 @@ void mm_login (NETMBX *mb,char *username,char *password,long trial) printf ("%s} username: ",tmp); fgets (username,NETMAXUSER-1,stdin); username[NETMAXUSER-1] = '\0'; - if (s = strchr (username,'\n')) *s = '\0'; + if ((s = strchr (username,'\n')) != NULL) *s = '\0'; s = "password: "; } if(strlen (s = getpass (s)) < MAILTMPLEN) strcpy (password,s); |