summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alpine/adrbkcmd.c6
-rw-r--r--alpine/arg.c3
-rw-r--r--alpine/flagmaint.c2
-rw-r--r--alpine/mailcmd.c2
-rwxr-xr-xconfigure3
-rw-r--r--configure.ac3
-rw-r--r--include/config.h.in3
-rw-r--r--include/system.h2
-rw-r--r--pith/conf.c9
-rw-r--r--pith/folder.c6
-rw-r--r--pith/msgno.c2
-rw-r--r--pith/pine.hlp2
-rw-r--r--pith/reply.c4
-rw-r--r--pith/smime.c2
-rw-r--r--pith/stream.c4
15 files changed, 30 insertions, 23 deletions
diff --git a/alpine/adrbkcmd.c b/alpine/adrbkcmd.c
index 8b80800b..8c0c0d62 100644
--- a/alpine/adrbkcmd.c
+++ b/alpine/adrbkcmd.c
@@ -7290,7 +7290,7 @@ prep_ldap_for_viewing(struct pine *ps, LDAP_CHOOSE_S *winning_e, SourceType srct
*/
snprintf(obuf, sizeof(obuf), "%c%c%c%s%s%c%c%c%c",
TAG_EMBED, TAG_HANDLE,
- strlen(buf), buf, vals[i],
+ strlen(buf), buf, vals[i]->bv_val,
TAG_EMBED, TAG_BOLDOFF,
TAG_EMBED, TAG_INVOFF);
obuf[sizeof(obuf)-1] = '\0';
@@ -7300,7 +7300,7 @@ prep_ldap_for_viewing(struct pine *ps, LDAP_CHOOSE_S *winning_e, SourceType srct
so_puts(store, "\n");
}
else{
- snprintf(obuf, sizeof(obuf), "%s", vals[i]);
+ snprintf(obuf, sizeof(obuf), "%s", vals[i]->bv_val);
obuf[sizeof(obuf)-1] = '\0';
if((tmp = fold(obuf, width, width,
@@ -7313,7 +7313,7 @@ prep_ldap_for_viewing(struct pine *ps, LDAP_CHOOSE_S *winning_e, SourceType srct
}
}
else{
- snprintf(obuf, sizeof(obuf), "%s", vals[i]);
+ snprintf(obuf, sizeof(obuf), "%s", vals[i]->bv_val);
obuf[sizeof(obuf)-1] = '\0';
if((tmp = fold(obuf, width, width,
diff --git a/alpine/arg.c b/alpine/arg.c
index 836adf36..793dc711 100644
--- a/alpine/arg.c
+++ b/alpine/arg.c
@@ -1322,7 +1322,8 @@ pinerc_cmdline_opt(char *arg)
/*--value is non-empty--*/
if(*value == '"' && !v->is_list){
value++;
- for(p1 = value; *p1 && *p1 != '"'; p1++);
+ for(p1 = value; *p1 && *p1 != '"'; p1++)
+ ;
if(*p1 == '"')
*p1 = '\0';
else
diff --git a/alpine/flagmaint.c b/alpine/flagmaint.c
index acdccb1d..6112979a 100644
--- a/alpine/flagmaint.c
+++ b/alpine/flagmaint.c
@@ -265,7 +265,7 @@ try_again:
(*alval)[offset+1] = NULL;
}
else{
- for(offset=0; (*alval)[offset]; offset++);
+ for(offset=0; (*alval)[offset]; offset++)
;
fs_resize((void **) alval, (offset + 2) * sizeof(char *));
diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c
index 9a37e7b4..eb506398 100644
--- a/alpine/mailcmd.c
+++ b/alpine/mailcmd.c
@@ -5622,7 +5622,7 @@ broach_folder(int qline, int allow_list, int *notrealinbox, CONTEXT_S **context)
if(f2) fs_give((void **)&f2);
flags = OE_APPEND_CURRENT;
- rc = optionally_enter(f1, qline, 0, sizeof(newfolder),
+ rc = optionally_enter((char *) f1, qline, 0, sizeof(newfolder),
(char *) prompt, ekey, help, &flags);
f2 = folder_name_encoded(f1);
diff --git a/configure b/configure
index 0f0a03f7..302076d5 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Rev:17 by chappa@washington.edu.
+# From configure.ac Rev:18 by chappa@washington.edu.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for alpine 2.20.9.
#
@@ -19353,6 +19353,7 @@ for ac_header in errno.h \
signal.h \
setjmp.h \
memory.h \
+ sys/ioctl.h \
sys/param.h \
sys/socket.h \
sys/uio.h \
diff --git a/configure.ac b/configure.ac
index ba9ba201..24ab7057 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@ dnl */
AC_PREREQ([2.69])
-AC_REVISION([Rev:17 by chappa@washington.edu])
+AC_REVISION([Rev:18 by chappa@washington.edu])
dnl Alpine Version Number is in $srcdir/VERSION
AC_INIT([alpine],[m4_normalize(m4_include(VERSION))],[chappa@washington.edu])
@@ -1605,6 +1605,7 @@ AC_CHECK_HEADERS([errno.h \
signal.h \
setjmp.h \
memory.h \
+ sys/ioctl.h \
sys/param.h \
sys/socket.h \
sys/uio.h \
diff --git a/include/config.h.in b/include/config.h.in
index 59a6ccd6..ad14ba6e 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -378,6 +378,9 @@
*/
#undef HAVE_SYS_DIR_H
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
diff --git a/include/system.h b/include/system.h
index 636eb82b..36c87445 100644
--- a/include/system.h
+++ b/include/system.h
@@ -197,7 +197,7 @@ void *memset(void *, int, size_t);
# include <netdb.h>
#endif
-#if GWINSZ_IN_SYS_IOCTL
+#if defined(GWINSZ_IN_SYS_IOCTL) || defined(HAVE_SYS_IOCTL_H)
# include <sys/ioctl.h>
#endif
diff --git a/pith/conf.c b/pith/conf.c
index 7f450be8..40fdbcdb 100644
--- a/pith/conf.c
+++ b/pith/conf.c
@@ -4690,8 +4690,8 @@ set_news_spec_current_val(int expand, int cmdline)
char buf[MAXPATH];
newsvar->global_val.l = (char **)fs_get(2 * sizeof(char *));
- snprintf(buf, sizeof(buf), "{%.*s/nntp}#news.[]", sizeof(buf)-20,
- ps_global->VAR_NNTP_SERVER[0]);
+ snprintf(buf, sizeof(buf), "{%.*s/nntp}#news.[]", MAXPATH-20,
+ ps_global->VAR_NNTP_SERVER[0]); /* MAXPATH = sizeof(buf) */
newsvar->global_val.l[0] = cpystr(buf);
newsvar->global_val.l[1] = NULL;
set_current_val(newsvar, expand, cmdline);
@@ -7627,9 +7627,10 @@ copy_localfile_to_remotefldr(RemType remotetype, char *local, char *remote,
void
panic1(char *message, char *arg)
{
- char buf1[1001], buf2[1001];
+#define SIZEOFBUF 1001
+ char buf1[SIZEOFBUF], buf2[SIZEOFBUF];
- snprintf(buf1, sizeof(buf1), "%.*s", MAX(sizeof(buf1) - 1 - strlen(message), 0), arg);
+ snprintf(buf1, sizeof(buf1), "%.*s", MAX(SIZEOFBUF - 1 - strlen(message), 0), arg);
snprintf(buf2, sizeof(buf2), message, buf1);
alpine_panic(buf2);
}
diff --git a/pith/folder.c b/pith/folder.c
index 63f1b1d8..774838a9 100644
--- a/pith/folder.c
+++ b/pith/folder.c
@@ -1407,7 +1407,7 @@ unsigned char *folder_name_decoded(unsigned char *mailbox)
{
unsigned char *s;
s = (unsigned char *) utf8_from_mutf7((unsigned char *) mailbox);
- if (s == NULL) s = (unsigned char *) cpystr(mailbox);
+ if (s == NULL) s = (unsigned char *) cpystr((char *)mailbox);
return s;
}
@@ -1417,8 +1417,8 @@ unsigned char *folder_name_decoded(unsigned char *mailbox)
unsigned char *folder_name_encoded(unsigned char *mailbox)
{
unsigned char *s;
- s = (char *) utf8_to_mutf7(mailbox);
- if (s == NULL) s = cpystr(mailbox);
+ if ((s = utf8_to_mutf7(mailbox)) == NULL)
+ s = (unsigned char *) cpystr((char *) mailbox);
return s;
}
diff --git a/pith/msgno.c b/pith/msgno.c
index e1dd2f35..91b53e12 100644
--- a/pith/msgno.c
+++ b/pith/msgno.c
@@ -271,7 +271,7 @@ msgno_exclude_deleted(MAILSTREAM *stream, MSGNO_S *msgs, char *sequence)
(void) count_flagged(stream, F_DEL);
if(sequence)
- mail_sequence (stream,sequence);
+ mail_sequence (stream,(unsigned char *) sequence);
/*
* Start with the end of the folder and work backwards so that
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 6ce90a71..ee0a1bdd 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 83 2015-07-26 08:29:01
+Alpine Commit 84 2015-07-26 14:15:47
============= h_news =================
<HTML>
<HEAD>
diff --git a/pith/reply.c b/pith/reply.c
index f60ce58f..834b945a 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -89,8 +89,8 @@ same_subject(char *s, char *t)
len = i < j ? j : i;
u = fs_get(6*len+1);
v = fs_get(6*len+1);
- s1 = (char *) rfc1522_decode_to_utf8(u, 6*len + 1, s);
- s2 = (char *) rfc1522_decode_to_utf8(v, 6*len + 1, t);
+ s1 = (char *) rfc1522_decode_to_utf8((unsigned char *) u, 6*len + 1, s);
+ s2 = (char *) rfc1522_decode_to_utf8((unsigned char *) v, 6*len + 1, t);
mail_strip_subject(s1, &u);
mail_strip_subject(s2, &v);
diff --git a/pith/smime.c b/pith/smime.c
index 841a2743..77433a80 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -2841,7 +2841,7 @@ do_detached_signature_verify(BODY *b, long msgno, char *section)
mail_free_envelope(&env);
mail_free_body_part(&b->nested.part);
- tmpB = mail_body_section(body, section);
+ tmpB = mail_body_section(body, (unsigned char *) section);
if(MIME_MSG(tmpB->type, tmpB->subtype))
b->nested.part = tmpB->nested.msg->body->nested.part;
else
diff --git a/pith/stream.c b/pith/stream.c
index cfdcc9a5..5cce21ce 100644
--- a/pith/stream.c
+++ b/pith/stream.c
@@ -3276,13 +3276,13 @@ streams_died(void)
folder = folder_name_decoded((unsigned char *)STREAMNAME(m));
q_status_message1(SM_ORDER | SM_DING, 3, 3,
_("MAIL FOLDER \"%s\" CLOSED DUE TO ACCESS ERROR"),
- short_str(pretty_fn(folder) ? pretty_fn(folder) : "?",
+ short_str(pretty_fn((char *) folder) ? pretty_fn((char *) folder) : "?",
tmp_20k_buf+1000, SIZEOF_20KBUF-1000, 35, FrontDots));
dprint((6, "streams_died: locked: \"%s\"\n",
folder));
if(rv == 1){
snprintf(tmp_20k_buf, SIZEOF_20KBUF, _("Folder \"%s\" is Closed"),
- short_str(pretty_fn(folder) ? pretty_fn(folder) : "?",
+ short_str(pretty_fn((char *)folder) ? pretty_fn((char *)folder) : "?",
tmp_20k_buf+1000, SIZEOF_20KBUF-1000, 35, FrontDots));
if(pith_opt_icon_text)
(*pith_opt_icon_text)(tmp_20k_buf, IT_MCLOSED);