* 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 *);
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 *);
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 **);
char *
OfficialName (char *name)
{
- char *p, *q, site[BUFSIZ];
+ unsigned char *p;
+ char *q, site[BUFSIZ];
struct hostent *hp;
static char buffer[BUFSIZ];
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;
smhear (void)
{
int i, code, cont, bc, rc, more;
- char *bp, *rp;
+ unsigned char *bp;
+ char *rp;
char **ehlo, buffer[BUFSIZ];
if (doingEHLO) {
YY_BUFFER_STATE lexhandle;
- register char *cp;
+ register unsigned char *cp;
static struct tws tw;
memset(&tw,0,sizeof(struct tws));
#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)
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;
case FT_LS_TRIM:
if (str) {
- char *xp;
+ unsigned char *xp;
strncpy(buffer, str, sizeof(buffer));
buffer[sizeof(buffer)-1] = '\0';
* (e.g., "To: ")
*/
{
- char *lp, *lastb;
+ unsigned char *lp;
+ char *lastb;
int indent, wid, len;
lp = str;
m_atoi (char *str)
{
int i;
- char *cp;
+ unsigned char *cp;
for (i = 0, cp = str; *cp; cp++) {
#ifdef LOCALE
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);
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;
static int
attr (struct msgs *mp, char *cp)
{
- register char *dp;
+ register unsigned char *dp;
char *bp = NULL;
register int i, j;
int found,
* 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 *);
int
-lequal (char *a, char *b)
+lequal (unsigned char *a, unsigned char *b)
{
for (; *a; a++, b++)
if (*b == 0)
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) {
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)) {
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;
{
/* 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)
/*
* static prototypes
*/
-static char *tailor_value (char *);
+static char *tailor_value (unsigned char *);
static void getuserinfo (void);
/*
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;
*/
static char *
-tailor_value (char *s)
+tailor_value (unsigned char *s)
{
int i, r;
char *bp;
static void
getuserinfo (void)
{
- register char *cp, *np;
+ register unsigned char *cp;
+ register char *np;
register struct passwd *pw;
#ifdef KPOP
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");
char *
-trimcpy (char *cp)
+trimcpy (unsigned char *cp)
{
- char *sp;
+ unsigned char *sp;
/* skip over leading whitespace */
while (isspace(*cp))
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 *);
static char *
-scanp (char *p)
+scanp (unsigned char *p)
{
while (isspace (*p))
p++;
static char *
getp (char *p)
{
- register char *cp = scanp (p);
+ register unsigned char *cp = scanp (p);
p = cp;
while (!isspace (*cp) && *cp)
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 != ';')
static char *
getalias (char *addrs)
{
- register char *pp, *qp;
+ register unsigned char *pp, *qp;
static char *cp = NULL;
if (cp == NULL)
#ifdef DBMPWD
struct passwd *pw;
char lname[32];
- char *c,*c1;
+ unsigned char *c;
+ char *c1;
#else /* DBMPWD */
if (homehead == NULL)
/*
* static prototypes
*/
-static void make_comp (char **);
+static void make_comp (unsigned char **);
int
{
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 };
}
static void
-make_comp (char **ap)
+make_comp (unsigned char **ap)
{
- register char *cp;
+ register unsigned char *cp;
char buffer[BUFSIZ];
if (*ap == NULL) {
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;
void
GetFolderOrder(void)
{
- char *p, *s;
+ unsigned char *p, *s;
int priority = 1;
struct Folder *o;
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;
bp = buffer;
for (;;) {
- char c;
+ unsigned char c;
if (read_tcp_socket (ftp_fd, &c, 1) < 1) {
if (expecteof)
*/
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);
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 *);
/*
/* 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) {
/* Get Content-Transfer-Encoding field */
if (!mh_strcasecmp (name, ENCODING_FIELD)) {
- char *cp, *dp;
+ unsigned char *cp, *dp;
char c;
struct str2init *s2i;
/* 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) {
*/
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;
*/
ep = (ap = ci->ci_attrs) + NPARMS;
while (*cp == ';') {
- char *vp, *up;
+ char *vp;
+ unsigned char *up;
if (ap >= ep) {
advise (NULL,
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;
{
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;
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;
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;
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;
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;
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. */
if (! strstr (buf, name_plus_equal)) {
char *insertion;
- char *cp;
+ unsigned char *cp;
char *prefix, *suffix;
/* Trim trailing space, esp. newline. */
static char *ovtxt;
-static char *onelp;
+static unsigned char *onelp;
static char *parptr;
putcomp (struct mcomp *c1, struct mcomp *c2, int flag)
{
int count, cchdr;
- char *cp;
+ unsigned char *cp;
cchdr = 0;
lm = 0;
*/
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);
/* 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",
}
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;
/*
}
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;
*/
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;
*/
ep = (ap = ci->ci_attrs) + NPARMS;
while (*cp == ';') {
- char *vp, *up;
+ char *vp;
+ unsigned char *up;
if (ap >= ep) {
advise (NULL,
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;
{
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;
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;
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;
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;
pINI (void)
{
int i, vrsn;
- char *bp;
+ unsigned char *bp;
struct record rcs, *rc;
rc = &rcs;
is_nontext (int msgnum)
{
int result, state;
- char *bp, *cp, *dp;
+ unsigned char *bp, *dp;
+ char *cp;
char buf[BUFSIZ], name[NAMESZ];
FILE *fp;
static char *
sosmash (char *subj, char *s)
{
- register char *cp, *dp, c;
+ register char *cp, *dp;
+ register unsigned char c;
if (s) {
cp = s;
int pargc = 2;
int hlen = strlen(host);
int plen = 1;
- char *cur, *pro;
+ unsigned char *cur, *pro;
char *c;
/* skip any initial space */
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);
static void
start_headers (void)
{
- char *cp;
+ unsigned char *cp;
char myhost[BUFSIZ], sigbuf[BUFSIZ];
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;
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))
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());
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;
is_nontext (char *msgnam)
{
int result, state;
- char *bp, *cp, *dp;
+ unsigned char *bp, *dp;
+ char *cp;
char buf[BUFSIZ], name[NAMESZ];
FILE *fp;
split (char *cp, char **vec)
{
int i;
- char *s;
+ unsigned char *s;
s = cp;
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 ("");
trim (char *cp)
{
char buffer[BUFSIZ*4];
- char *bp, *sp;
+ unsigned char *bp, *sp;
if (cp == NULL)
return NULL;
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 };
* 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;
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 *);
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;