X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/afee8ed17a56617618fb7f963b111d7cf0fb56e7..b15948e6710cd1d7cc29b661591ac18c2de4cbd2:/uip/mhbuildsbr.c?ds=sidebyside diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index a344a7c7..d2d033f1 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -62,7 +62,6 @@ void content_error (char *, CT, char *, ...); int find_cache (CT, int, int *, char *, char *, int); /* mhfree.c */ -void free_content (CT); void free_ctinfo (CT); void free_encoding (CT, int); @@ -403,8 +402,7 @@ static int user_content (FILE *in, char *file, char *buf, CT *ctp) { int extrnal, vrsn; - unsigned char *cp; - char **ap; + char *cp, **ap; char buffer[BUFSIZ]; struct multipart *m; struct part **pp; @@ -677,7 +675,7 @@ use_forw: if (ci->ci_magic) { /* check if specifies command to execute */ if (*ci->ci_magic == '|' || *ci->ci_magic == '!') { - for (cp = ci->ci_magic + 1; isspace (*cp); cp++) + for (cp = ci->ci_magic + 1; isspace ((unsigned char) *cp); cp++) continue; if (!*cp) adios (NULL, "empty pipe command for #%s directive", ci->ci_type); @@ -1096,7 +1094,7 @@ raw: if ((out = fopen (ce->ce_file, "w")) == NULL) adios (ce->ce_file, "unable to open for writing"); - for (i = 0; (child_id = vfork()) == NOTOK && i > 5; i++) + for (i = 0; (child_id = fork()) == NOTOK && i > 5; i++) sleep (5); switch (child_id) { case NOTOK: @@ -1156,7 +1154,7 @@ scan_content (CT ct) int checklinelen = 0, linelen = 0; /* check for long lines */ int checkboundary = 0, boundaryclash = 0; /* check if clashes with multipart boundary */ int checklinespace = 0, linespace = 0; /* check if any line ends with space */ - unsigned char *cp = NULL, buffer[BUFSIZ]; + char *cp = NULL, buffer[BUFSIZ]; struct text *t = NULL; FILE *in = NULL; CE ce = ct->c_cefile; @@ -1251,7 +1249,7 @@ scan_content (CT ct) */ if (check8bit) { for (cp = buffer; *cp; cp++) { - if (!isascii (*cp)) { + if (!isascii ((unsigned char) *cp)) { contains8bit = 1; check8bit = 0; /* no need to keep checking */ } @@ -1269,7 +1267,7 @@ scan_content (CT ct) /* * Check if line ends with a space. */ - if (checklinespace && (cp = buffer + strlen (buffer) - 2) > buffer && isspace (*cp)) { + if (checklinespace && (cp = buffer + strlen (buffer) - 2) > buffer && isspace ((unsigned char) *cp)) { linespace = 1; checklinespace = 0; /* no need to keep checking */ } @@ -1280,10 +1278,10 @@ scan_content (CT ct) */ if (checkboundary && buffer[0] == '-' && buffer[1] == '-') { for (cp = buffer + strlen (buffer) - 1; cp >= buffer; cp--) - if (!isspace (*cp)) + if (!isspace ((unsigned char) *cp)) break; *++cp = '\0'; - if (!strncmp(buffer + 2, prefix, len) && isdigit(buffer[2 + len])) { + if (!strncmp(buffer + 2, prefix, len) && isdigit((unsigned char) buffer[2 + len])) { boundaryclash = 1; checkboundary = 0; /* no need to keep checking */ } @@ -1642,7 +1640,8 @@ calculate_digest (CT ct, int asciiP) } /* encode the digest using base64 */ - for (dp = digest, op = outbuf, cc = sizeof(digest) / sizeof(digest[0]); + for (dp = digest, op = (char *) outbuf, + cc = sizeof(digest) / sizeof(digest[0]); cc > 0; cc -= 3, op += 4) { unsigned long bits; char *bp;