From 13f84dd50ca5754391dbd3296a5c7425f9363600 Mon Sep 17 00:00:00 2001 From: Joel Reicher Date: Fri, 13 Apr 2007 11:53:08 +0000 Subject: [PATCH] Change all chars being passed to the ctype macros (isalph(), etc.) to be unsigned chars, following through to change any other types as necessary (e.g. comparison between two pointers). Not all chars have been changed to unsigned chars; just those that were in danger of being sign extended when passed to the int-taking ctype macros. --- h/mf.h | 2 +- h/prototypes.h | 4 ++-- mts/smtp/hosts.c | 6 ++++-- mts/smtp/smtp.c | 3 ++- sbr/dtimep.lex | 2 +- sbr/fmt_compile.c | 2 +- sbr/fmt_scan.c | 11 +++++++---- sbr/m_atoi.c | 2 +- sbr/m_convert.c | 9 +++++---- sbr/mf.c | 19 +++++++++++-------- sbr/mts.c | 10 ++++++---- sbr/seq_nameok.c | 4 ++-- sbr/trimcpy.c | 4 ++-- uip/aliasbr.c | 13 +++++++------ uip/anno.c | 9 +++++---- uip/distsbr.c | 3 ++- uip/flist.c | 5 +++-- uip/ftpsbr.c | 2 +- uip/mhbuildsbr.c | 44 ++++++++++++++++++++++++++------------------ uip/mhlsbr.c | 4 ++-- uip/mhparse.c | 34 +++++++++++++++++++++------------- uip/msh.c | 5 +++-- uip/mshcmds.c | 6 ++++-- uip/popsbr.c | 2 +- uip/post.c | 10 +++++----- uip/replsbr.c | 3 ++- uip/scansbr.c | 3 ++- uip/show.c | 3 ++- uip/slocal.c | 8 ++++---- uip/sortm.c | 6 ++++-- uip/spost.c | 6 +++--- 31 files changed, 142 insertions(+), 102 deletions(-) diff --git a/h/mf.h b/h/mf.h index a4c81e8..1f60919 100644 --- a/h/mf.h +++ b/h/mf.h @@ -73,7 +73,7 @@ struct adrx { * prototypes */ int isfrom(char *); -int lequal (char *, char *); +int lequal (unsigned char *, unsigned char *); int mfgets (FILE *, char **); char *legal_person (char *); struct adrx *seekadrx (char *); diff --git a/h/prototypes.h b/h/prototypes.h index 7e8948e..a91418e 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -107,7 +107,7 @@ int seq_delmsg (struct msgs *, char *, int); int seq_delsel (struct msgs *, char *, int, int); int seq_getnum (struct msgs *, char *); char *seq_list (struct msgs *, char *); -int seq_nameok (char *); +int seq_nameok (unsigned char *); void seq_print (struct msgs *, char *); void seq_printall (struct msgs *); void seq_read (struct msgs *); @@ -120,7 +120,7 @@ int smatch(char *, struct swit *); char *snprintb (char *, size_t, unsigned, char *); int ssequal (char *, char *); int stringdex (char *, char *); -char *trimcpy (char *); +char *trimcpy (unsigned char *); int unputenv (char *); int uprf (char *, char *); int vfgets (FILE *, char **); diff --git a/mts/smtp/hosts.c b/mts/smtp/hosts.c index 607f4ec..33eb9e6 100644 --- a/mts/smtp/hosts.c +++ b/mts/smtp/hosts.c @@ -36,7 +36,8 @@ static int init_hs(void); char * OfficialName (char *name) { - char *p, *q, site[BUFSIZ]; + unsigned char *p; + char *q, site[BUFSIZ]; struct hostent *hp; static char buffer[BUFSIZ]; @@ -85,7 +86,8 @@ OfficialName (char *name) static int init_hs (void) { - char *cp, *dp, **q, **r; + unsigned char *cp; + char *dp, **q, **r; char buffer[BUFSIZ], *aliases[NALIASES]; register struct host *h; register FILE *fp; diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index da02701..1ab027f 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -1570,7 +1570,8 @@ static int smhear (void) { int i, code, cont, bc, rc, more; - char *bp, *rp; + unsigned char *bp; + char *rp; char **ehlo, buffer[BUFSIZ]; if (doingEHLO) { diff --git a/sbr/dtimep.lex b/sbr/dtimep.lex index a228694..113f2ea 100644 --- a/sbr/dtimep.lex +++ b/sbr/dtimep.lex @@ -227,7 +227,7 @@ nl [ \t\n()] YY_BUFFER_STATE lexhandle; - register char *cp; + register unsigned char *cp; static struct tws tw; memset(&tw,0,sizeof(struct tws)); diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 798f1f6..d699916 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -183,7 +183,7 @@ static struct ftable functable[] = { #define PUTC(c) NEW(FT_CHAR,0,0); fp->f_char = (c); static char *format_string; -static char *usr_fstring; /* for CERROR */ +static unsigned char *usr_fstring; /* for CERROR */ #define CERROR(str) compile_error (str, cp) diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index b212b12..c3d265a 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -295,8 +295,10 @@ get_x400_comp (char *mbox, char *key, char *buffer, int buffer_len) struct format * fmt_scan (struct format *format, char *scanl, int width, int *dat) { - char *cp, *ep, *sp; - char *savestr, *str = NULL; + char *cp, *ep; + unsigned char *sp; + char *savestr; + unsigned char *str = NULL; char buffer[BUFSIZ], buffer2[BUFSIZ]; int i, c, ljust, n; int value = 0; @@ -493,7 +495,7 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) case FT_LS_TRIM: if (str) { - char *xp; + unsigned char *xp; strncpy(buffer, str, sizeof(buffer)); buffer[sizeof(buffer)-1] = '\0'; @@ -801,7 +803,8 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) * (e.g., "To: ") */ { - char *lp, *lastb; + unsigned char *lp; + char *lastb; int indent, wid, len; lp = str; diff --git a/sbr/m_atoi.c b/sbr/m_atoi.c index 221ff0c..dffc799 100644 --- a/sbr/m_atoi.c +++ b/sbr/m_atoi.c @@ -18,7 +18,7 @@ int m_atoi (char *str) { int i; - char *cp; + unsigned char *cp; for (i = 0, cp = str; *cp; cp++) { #ifdef LOCALE diff --git a/sbr/m_convert.c b/sbr/m_convert.c index bbefc99..15c2906 100644 --- a/sbr/m_convert.c +++ b/sbr/m_convert.c @@ -40,7 +40,8 @@ int m_convert (struct msgs *mp, char *name) { int first, last, found, range, err; - char *bp, *cp; + unsigned char *bp; + char *cp; /* check if user defined sequence */ err = attr (mp, cp = name); @@ -240,8 +241,8 @@ static int m_conv (struct msgs *mp, char *str, int call) { register int i; - register char *cp, *bp; - char buf[16]; + register unsigned char *cp, *bp; + unsigned char buf[16]; convdir = 1; cp = bp = str; @@ -326,7 +327,7 @@ m_conv (struct msgs *mp, char *str, int call) static int attr (struct msgs *mp, char *cp) { - register char *dp; + register unsigned char *dp; char *bp = NULL; register int i, j; int found, diff --git a/sbr/mf.c b/sbr/mf.c index 44dab8a..2559b67 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -18,7 +18,7 @@ * static prototypes */ static char *getcpy (char *); -static void compress (char *, char *); +static void compress (char *, unsigned char *); static int isat (char *); static int parse_address (void); static int phrase (char *); @@ -57,7 +57,7 @@ isfrom(char *string) int -lequal (char *a, char *b) +lequal (unsigned char *a, unsigned char *b) { for (; *a; a++, b++) if (*b == 0) @@ -133,7 +133,8 @@ seekadrx (char *addrs) struct adrx * uucpadrx (char *addrs) { - register char *cp, *wp, *xp, *yp, *zp; + register unsigned char *cp, *wp, *xp, *yp; + register char *zp; register struct adrx *adrxp = &adrxs1; if (vp == NULL) { @@ -206,9 +207,10 @@ uucpadrx (char *addrs) static void -compress (char *fp, char *tp) +compress (char *fp, unsigned char *tp) { - register char c, *cp; + register char c; + register unsigned char *cp; for (c = ' ', cp = tp; (*tp = *fp++) != 0;) if (isspace (*tp)) { @@ -333,8 +335,8 @@ static int ingrp = 0; static int last_lex = LX_END; static char *dp = NULL; -static char *cp = NULL; -static char *ap = NULL; +static unsigned char *cp = NULL; +static unsigned char *ap = NULL; static char *pers = NULL; static char *mbox = NULL; static char *host = NULL; @@ -759,7 +761,8 @@ my_lex (char *buffer) { /* buffer should be at least BUFSIZ bytes long */ int i, gotat = 0; - register char c, *bp; + register unsigned char c; + register char *bp; /* Add C to the buffer bp. After use of this macro *bp is guaranteed to be within the buffer. */ #define ADDCHR(C) do { *bp++ = (C); if ((bp - buffer) == (BUFSIZ-1)) goto my_lex_buffull; } while (0) diff --git a/sbr/mts.c b/sbr/mts.c index 7941e09..cc5ff8e 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -31,7 +31,7 @@ /* * static prototypes */ -static char *tailor_value (char *); +static char *tailor_value (unsigned char *); static void getuserinfo (void); /* @@ -172,7 +172,8 @@ static struct bind binds[] = { void mts_init (char *name) { - char *bp, *cp, buffer[BUFSIZ]; + unsigned char *bp; + char *cp, buffer[BUFSIZ]; struct bind *b; FILE *fp; static int inited = 0; @@ -233,7 +234,7 @@ mts_init (char *name) */ static char * -tailor_value (char *s) +tailor_value (unsigned char *s) { int i, r; char *bp; @@ -406,7 +407,8 @@ getfullname (void) static void getuserinfo (void) { - register char *cp, *np; + register unsigned char *cp; + register char *np; register struct passwd *pw; #ifdef KPOP diff --git a/sbr/seq_nameok.c b/sbr/seq_nameok.c index 0eeddb3..678ab5b 100644 --- a/sbr/seq_nameok.c +++ b/sbr/seq_nameok.c @@ -13,9 +13,9 @@ int -seq_nameok (char *s) +seq_nameok (unsigned char *s) { - char *pp; + unsigned char *pp; if (s == NULL || *s == '\0') { advise (NULL, "empty sequence name"); diff --git a/sbr/trimcpy.c b/sbr/trimcpy.c index c341f00..8b57ad6 100644 --- a/sbr/trimcpy.c +++ b/sbr/trimcpy.c @@ -15,9 +15,9 @@ char * -trimcpy (char *cp) +trimcpy (unsigned char *cp) { - char *sp; + unsigned char *sp; /* skip over leading whitespace */ while (isspace(*cp)) diff --git a/uip/aliasbr.c b/uip/aliasbr.c index af3827b..ec7be94 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -36,7 +36,7 @@ char *akerror (int); static char *akval (struct aka *, char *); static int aleq (char *, char *); -static char *scanp (char *); +static char *scanp (unsigned char *); static char *getp (char *); static char *seekp (char *, char *, char **); static int addfile (struct aka *, char *); @@ -279,7 +279,7 @@ akerror (int i) static char * -scanp (char *p) +scanp (unsigned char *p) { while (isspace (*p)) p++; @@ -290,7 +290,7 @@ scanp (char *p) static char * getp (char *p) { - register char *cp = scanp (p); + register unsigned char *cp = scanp (p); p = cp; while (!isspace (*cp) && *cp) @@ -304,7 +304,7 @@ getp (char *p) static char * seekp (char *p, char *c, char **a) { - register char *cp; + register unsigned char *cp; p = cp = scanp (p); while (!isspace (*cp) && *cp && *cp != ':' && *cp != ';') @@ -436,7 +436,7 @@ addall (struct aka *ak) static char * getalias (char *addrs) { - register char *pp, *qp; + register unsigned char *pp, *qp; static char *cp = NULL; if (cp == NULL) @@ -566,7 +566,8 @@ seek_home (char *name) #ifdef DBMPWD struct passwd *pw; char lname[32]; - char *c,*c1; + unsigned char *c; + char *c1; #else /* DBMPWD */ if (homehead == NULL) diff --git a/uip/anno.c b/uip/anno.c index ca3497a..86fe3c3 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -85,7 +85,7 @@ static struct swit switches[] = { /* * static prototypes */ -static void make_comp (char **); +static void make_comp (unsigned char **); int @@ -93,7 +93,8 @@ main (int argc, char **argv) { int inplace = 1, datesw = 1; int msgnum; - char *cp, *maildir, *comp = NULL; + char *cp, *maildir; + unsigned char *comp = NULL; char *text = NULL, *folder = NULL, buf[BUFSIZ]; char **argp, **arguments; struct msgs_array msgs = { 0, 0, NULL }; @@ -288,9 +289,9 @@ main (int argc, char **argv) } static void -make_comp (char **ap) +make_comp (unsigned char **ap) { - register char *cp; + register unsigned char *cp; char buffer[BUFSIZ]; if (*ap == NULL) { diff --git a/uip/distsbr.c b/uip/distsbr.c index 0191037..1b5f5e1 100644 --- a/uip/distsbr.c +++ b/uip/distsbr.c @@ -30,7 +30,8 @@ int distout (char *drft, char *msgnam, char *backup) { int state; - register char *dp, *resent; + register unsigned char *dp; + register char *resent; char name[NAMESZ], buffer[BUFSIZ]; register FILE *ifp, *ofp; diff --git a/uip/flist.c b/uip/flist.c index cb80978..97488bb 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -287,7 +287,7 @@ main(int argc, char **argv) void GetFolderOrder(void) { - char *p, *s; + unsigned char *p, *s; int priority = 1; struct Folder *o; @@ -399,7 +399,8 @@ BuildFolderList(char *dirName, int searchdepth) void BuildFolderListRecurse(char *dirName, struct stat *s, int searchdepth) { - char *base, *n, name[PATH_MAX]; + char *base, name[PATH_MAX]; + unsigned char *n; int nlinks; DIR *dir; struct dirent *dp; diff --git a/uip/ftpsbr.c b/uip/ftpsbr.c index 9c118a5..5b079ba 100644 --- a/uip/ftpsbr.c +++ b/uip/ftpsbr.c @@ -475,7 +475,7 @@ getreply (int complete, int expecteof) bp = buffer; for (;;) { - char c; + unsigned char c; if (read_tcp_socket (ftp_fd, &c, 1) < 1) { if (expecteof) diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index 8906d7f..2c101b9 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -152,8 +152,8 @@ int pidcheck (int); */ static CT get_content (FILE *, char *, int); static int add_header (CT, char *, char *); -static int get_ctinfo (char *, CT, int); -static int get_comment (CT, char **, int); +static int get_ctinfo (unsigned char *, CT, int); +static int get_comment (CT, unsigned char **, int); static int InitGeneric (CT); static int InitText (CT); static int InitMultiPart (CT); @@ -186,7 +186,7 @@ static int scan_content (CT); static int build_headers (CT); static char *calculate_digest (CT, int); static int readDigest (CT, char *); -static char *incl_name_value (char *, char *, char *); +static char *incl_name_value (unsigned char *, char *, char *); static char *extract_name_value (char *, char *); /* @@ -499,7 +499,8 @@ get_content (FILE *in, char *file, int toplevel) /* Get MIME-Version field */ if (!mh_strcasecmp (name, VRSN_FIELD)) { int ucmp; - char c, *cp, *dp; + char c; + unsigned char *cp, *dp; cp = add (buf, NULL); while (state == FLDPLUS) { @@ -585,7 +586,7 @@ get_content (FILE *in, char *file, int toplevel) /* Get Content-Transfer-Encoding field */ if (!mh_strcasecmp (name, ENCODING_FIELD)) { - char *cp, *dp; + unsigned char *cp, *dp; char c; struct str2init *s2i; @@ -665,7 +666,8 @@ get_content (FILE *in, char *file, int toplevel) /* Get Content-MD5 field */ if (!mh_strcasecmp (name, MD5_FIELD)) { - char *cp, *dp, *ep; + unsigned char *cp, *dp; + char *ep; cp = add (buf, NULL); while (state == FLDPLUS) { @@ -828,10 +830,11 @@ add_header (CT ct, char *name, char *value) */ static int -get_ctinfo (char *cp, CT ct, int magic) +get_ctinfo (unsigned char *cp, CT ct, int magic) { int i; - char *dp, **ap, **ep; + unsigned char *dp; + char **ap, **ep; char c; CI ci; @@ -926,7 +929,8 @@ magic_skip: */ ep = (ap = ci->ci_attrs) + NPARMS; while (*cp == ';') { - char *vp, *up; + char *vp; + unsigned char *up; if (ap >= ep) { advise (NULL, @@ -1127,10 +1131,11 @@ bad_quote: static int -get_comment (CT ct, char **ap, int istype) +get_comment (CT ct, unsigned char **ap, int istype) { int i; - char *bp, *cp; + char *bp; + unsigned char *cp; char c, buffer[BUFSIZ], *dp; CI ci; @@ -1259,7 +1264,8 @@ InitMultiPart (CT ct) { int inout; long last, pos; - char *cp, *dp, **ap, **ep; + unsigned char *cp, *dp; + char **ap, **ep; char *bp, buffer[BUFSIZ]; struct multipart *m; struct k2v *kv; @@ -1895,7 +1901,8 @@ openBase64 (CT ct, char **file) int fd, len, skip; unsigned long bits; unsigned char value, *b, *b1, *b2, *b3; - char *cp, *ep, buffer[BUFSIZ]; + unsigned char *cp, *ep; + char buffer[BUFSIZ]; CE ce; MD5_CTX mdContext; @@ -2091,7 +2098,7 @@ static int openQuoted (CT ct, char **file) { int cc, digested, len, quoted; - char *cp, *ep; + unsigned char *cp, *ep; char buffer[BUFSIZ]; unsigned char mask; CE ce; @@ -2918,7 +2925,8 @@ static int user_content (FILE *in, char *file, char *buf, CT *ctp) { int extrnal, vrsn; - char *cp, **ap; + unsigned char *cp; + char **ap; char buffer[BUFSIZ]; struct multipart *m; struct part **pp; @@ -3702,7 +3710,7 @@ scan_content (CT ct) int checkboundary, boundaryclash = 0; /* check if clashes with multipart boundary */ int checklinespace, linespace = 0; /* check if any line ends with space */ int checkebcdic, ebcdicunsafe = 0; /* check if contains ebcdic unsafe characters */ - char *cp, buffer[BUFSIZ]; + unsigned char *cp, buffer[BUFSIZ]; struct text *t; FILE *in; CE ce = ct->c_cefile; @@ -4325,7 +4333,7 @@ invalid_digest: filename="foo". If it doesn't and value does, use value from that. */ static char * -incl_name_value (char *buf, char *name, char *value) { +incl_name_value (unsigned char *buf, char *name, char *value) { char *newbuf = buf; /* Assume that name is non-null. */ @@ -4334,7 +4342,7 @@ incl_name_value (char *buf, char *name, char *value) { if (! strstr (buf, name_plus_equal)) { char *insertion; - char *cp; + unsigned char *cp; char *prefix, *suffix; /* Trim trailing space, esp. newline. */ diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index ce8b33d..acf21de 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -230,7 +230,7 @@ static int wid; static char *ovtxt; -static char *onelp; +static unsigned char *onelp; static char *parptr; @@ -1185,7 +1185,7 @@ static void putcomp (struct mcomp *c1, struct mcomp *c2, int flag) { int count, cchdr; - char *cp; + unsigned char *cp; cchdr = 0; lm = 0; diff --git a/uip/mhparse.c b/uip/mhparse.c index fea9904..733048d 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -127,8 +127,8 @@ CT parse_mime (char *); */ static CT get_content (FILE *, char *, int); static int add_header (CT, char *, char *); -static int get_ctinfo (char *, CT); -static int get_comment (CT, char **, int); +static int get_ctinfo (unsigned char *, CT); +static int get_comment (CT, unsigned char **, int); static int InitGeneric (CT); static int InitText (CT); static int InitMultiPart (CT); @@ -377,7 +377,8 @@ get_content (FILE *in, char *file, int toplevel) /* Get MIME-Version field */ if (!mh_strcasecmp (hp->name, VRSN_FIELD)) { int ucmp; - char c, *cp, *dp; + char c; + unsigned char *cp, *dp; if (ct->c_vrsn) { advise (NULL, "message %s has multiple %s: fields", @@ -444,7 +445,8 @@ get_content (FILE *in, char *file, int toplevel) } else if (!mh_strcasecmp (hp->name, ENCODING_FIELD)) { /* Get Content-Transfer-Encoding field */ - char c, *cp, *dp; + char c; + unsigned char *cp, *dp; struct str2init *s2i; /* @@ -485,7 +487,8 @@ get_content (FILE *in, char *file, int toplevel) } else if (!mh_strcasecmp (hp->name, MD5_FIELD)) { /* Get Content-MD5 field */ - char *cp, *dp, *ep; + unsigned char *cp, *dp; + char *ep; if (!checksw) goto next_header; @@ -611,10 +614,11 @@ add_header (CT ct, char *name, char *value) */ static int -get_ctinfo (char *cp, CT ct) +get_ctinfo (unsigned char *cp, CT ct) { int i; - char *dp, **ap, **ep; + unsigned char *dp; + char **ap, **ep; char c; CI ci; @@ -708,7 +712,8 @@ magic_skip: */ ep = (ap = ci->ci_attrs) + NPARMS; while (*cp == ';') { - char *vp, *up; + char *vp; + unsigned char *up; if (ap >= ep) { advise (NULL, @@ -812,10 +817,11 @@ bad_quote: static int -get_comment (CT ct, char **ap, int istype) +get_comment (CT ct, unsigned char **ap, int istype) { int i; - char *bp, *cp; + char *bp; + unsigned char *cp; char c, buffer[BUFSIZ], *dp; CI ci; @@ -956,7 +962,8 @@ InitMultiPart (CT ct) { int inout; long last, pos; - char *cp, *dp, **ap, **ep; + unsigned char *cp, *dp; + char **ap, **ep; char *bp, buffer[BUFSIZ]; struct multipart *m; struct k2v *kv; @@ -1568,7 +1575,8 @@ openBase64 (CT ct, char **file) int fd, len, skip; unsigned long bits; unsigned char value, *b, *b1, *b2, *b3; - char *cp, *ep, buffer[BUFSIZ]; + unsigned char *cp, *ep; + char buffer[BUFSIZ]; /* sbeck -- handle prefixes */ CI ci; CE ce; @@ -1779,7 +1787,7 @@ static int openQuoted (CT ct, char **file) { int cc, digested, len, quoted; - char *cp, *ep; + unsigned char *cp, *ep; char buffer[BUFSIZ]; unsigned char mask; CE ce; diff --git a/uip/msh.c b/uip/msh.c index 4b91790..3f8a7ab 100644 --- a/uip/msh.c +++ b/uip/msh.c @@ -1544,7 +1544,8 @@ static int parse (char *buffer, struct Cmd *cmdp) { int argp = 0; - char c, *cp, *pp; + unsigned char c, *cp; + char *pp; cmdp->line[0] = 0; pp = cmdp->args[argp++] = cmdp->line; @@ -1891,7 +1892,7 @@ static int pINI (void) { int i, vrsn; - char *bp; + unsigned char *bp; struct record rcs, *rc; rc = &rcs; diff --git a/uip/mshcmds.c b/uip/mshcmds.c index 60f3413..147a261 100644 --- a/uip/mshcmds.c +++ b/uip/mshcmds.c @@ -2547,7 +2547,8 @@ static int is_nontext (int msgnum) { int result, state; - char *bp, *cp, *dp; + unsigned char *bp, *dp; + char *cp; char buf[BUFSIZ], name[NAMESZ]; FILE *fp; @@ -2960,7 +2961,8 @@ subsort (struct Msg *a, struct Msg *b) static char * sosmash (char *subj, char *s) { - register char *cp, *dp, c; + register char *cp, *dp; + register unsigned char c; if (s) { cp = s; diff --git a/uip/popsbr.c b/uip/popsbr.c index 363f925..6a7eeee 100644 --- a/uip/popsbr.c +++ b/uip/popsbr.c @@ -455,7 +455,7 @@ parse_proxy(char *proxy, char *host) int pargc = 2; int hlen = strlen(host); int plen = 1; - char *cur, *pro; + unsigned char *cur, *pro; char *c; /* skip any initial space */ diff --git a/uip/post.c b/uip/post.c index 96120c1..1f706fe 100644 --- a/uip/post.c +++ b/uip/post.c @@ -294,7 +294,7 @@ static int insert (struct mailname *); static void pl (void); static void anno (void); static int annoaux (struct mailname *); -static void insert_fcc (struct headers *, char *); +static void insert_fcc (struct headers *, unsigned char *); static void make_bcc_file (int); static void verify_all_addresses (int); static void chkadr (void); @@ -830,7 +830,7 @@ putfmt (char *name, char *str, FILE *out) static void start_headers (void) { - char *cp; + unsigned char *cp; char myhost[BUFSIZ], sigbuf[BUFSIZ]; struct mailname *mp; @@ -1128,9 +1128,9 @@ annoaux (struct mailname *mp) static void -insert_fcc (struct headers *hdr, char *pp) +insert_fcc (struct headers *hdr, unsigned char *pp) { - char *cp; + unsigned char *cp; for (cp = pp; isspace (*cp); cp++) continue; @@ -1299,7 +1299,7 @@ find_prefix (void) result = OK; while (fgets (buffer, sizeof(buffer) - 1, in)) if (buffer[0] == '-' && buffer[1] == '-') { - char *cp; + unsigned char *cp; for (cp = buffer + strlen (buffer) - 1; cp >= buffer; cp--) if (!isspace (*cp)) diff --git a/uip/replsbr.c b/uip/replsbr.c index 0d375ae..a415346 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -79,7 +79,8 @@ replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen, register char **ap; register struct comp **savecomp; int char_read = 0, format_len, mask; - char name[NAMESZ], *scanl, *cp; + char name[NAMESZ], *scanl; + unsigned char *cp; FILE *out; mask = umask(~m_gmprot()); diff --git a/uip/scansbr.c b/uip/scansbr.c index d9d6bee..1b6a0ed 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -74,7 +74,8 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, int unseen, char *folder, long size, int noisy) { int i, compnum, encrypted, state; - char *cp, *tmpbuf, **nxtbuf; + unsigned char *cp, *tmpbuf; + char **nxtbuf; char *saved_c_text; struct comp *cptr; struct comp **savecomp; diff --git a/uip/show.c b/uip/show.c index 2db32d7..e783a79 100644 --- a/uip/show.c +++ b/uip/show.c @@ -385,7 +385,8 @@ static int is_nontext (char *msgnam) { int result, state; - char *bp, *cp, *dp; + unsigned char *bp, *dp; + char *cp; char buf[BUFSIZ], name[NAMESZ]; FILE *fp; diff --git a/uip/slocal.c b/uip/slocal.c index 817a411..08a3e28 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -683,7 +683,7 @@ static int split (char *cp, char **vec) { int i; - char *s; + unsigned char *s; s = cp; @@ -1232,8 +1232,8 @@ static void get_sender (char *envelope, char **sender) { int i; - char *cp; - char buffer[BUFSIZ]; + unsigned char *cp; + unsigned char buffer[BUFSIZ]; if (envelope == NULL) { *sender = getcpy (""); @@ -1412,7 +1412,7 @@ static char * trim (char *cp) { char buffer[BUFSIZ*4]; - char *bp, *sp; + unsigned char *bp, *sp; if (cp == NULL) return NULL; diff --git a/uip/sortm.c b/uip/sortm.c index d483d86..65291ce 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -70,7 +70,8 @@ int main (int argc, char **argv) { int i, msgnum; - char *cp, *maildir, *datesw = NULL; + unsigned char *cp; + char *maildir, *datesw = NULL; char *folder = NULL, buf[BUFSIZ], **argp; char **arguments; struct msgs_array msgs = { 0, 0, NULL }; @@ -408,7 +409,8 @@ get_fields (char *datesw, int msg, struct smsg *smsg) * leading "re:", everything but letters & smash * letters to lower case. */ - register char *cp, *cp2, c; + register char *cp, *cp2; + register unsigned char c; cp = subjcomp; cp2 = subjcomp; diff --git a/uip/spost.c b/uip/spost.c index bef70be..1c1a8bc 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -191,7 +191,7 @@ static void finish_headers (FILE *); static int get_header (char *, struct headers *); static void putadr (char *, struct mailname *); static int putone (char *, int, int); -static void insert_fcc (struct headers *, char *); +static void insert_fcc (struct headers *, unsigned char *); static void file (char *); static void fcc (char *, char *); @@ -720,9 +720,9 @@ putone (char *adr, int pos, int indent) static void -insert_fcc (struct headers *hdr, char *pp) +insert_fcc (struct headers *hdr, unsigned char *pp) { - char *cp; + unsigned char *cp; for (cp = pp; isspace (*cp); cp++) continue; -- 1.7.10.4