*/
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 *);
/*
fflush (stdout);
fflush (stderr);
- return done (1);
+ done (1);
+ return 1;
}
/* 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;
while (*cp)
cp++;
fprintf (stderr, "invalid MD5 digest (got %d octets)\n",
- cp - bp);
+ (int)(cp - bp));
}
return NOTOK;
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. */