#include <fcntl.h>
#include <h/signals.h>
#include <h/md5.h>
-#include <errno.h>
-#include <signal.h>
#include <h/mts.h>
#include <h/tws.h>
#include <h/mime.h>
char *boundary = ci->ci_values[0], **ap, **vp;
for (ap = ci->ci_attrs, vp = ci->ci_values; *ap; ++ap, ++vp) {
- if (! mh_strcasecmp ("boundary", *ap)) {
+ if (! strcasecmp ("boundary", *ap)) {
boundary = *vp;
break;
}
case 'N':
for (ap = ci2->ci_attrs, ep = ci2->ci_values; *ap; ap++, ep++)
- if (!mh_strcasecmp (*ap, "name")) {
+ if (!strcasecmp (*ap, "name")) {
fprintf (out, "%s", *ep);
break;
}
write8Bit (CT ct, FILE *out)
{
int fd;
+ size_t inbytes;
char c, *file, buffer[BUFSIZ];
- CE ce = ct->c_cefile;
+ CE ce = &ct->c_cefile;
file = NULL;
if ((fd = (*ct->c_ceopenfnx) (ct, &file)) == NOTOK)
return NOTOK;
c = '\n';
- while (fgets (buffer, sizeof(buffer) - 1, ce->ce_fp)) {
- c = buffer[strlen (buffer) - 1];
- fputs (buffer, out);
+ while ((inbytes = fread (buffer, 1, sizeof buffer, ce->ce_fp)) > 0) {
+ c = buffer[inbytes - 1];
+ fwrite (buffer, 1, inbytes, out);
}
if (c != '\n')
putc ('\n', out);
int fd;
char *cp, *file;
char c, buffer[BUFSIZ];
- CE ce = ct->c_cefile;
+ CE ce = &ct->c_cefile;
file = NULL;
if ((fd = (*ct->c_ceopenfnx) (ct, &file)) == NOTOK)
{
int fd, result;
char *file;
- CE ce = ct->c_cefile;
+ CE ce = &ct->c_cefile;
file = NULL;
if ((fd = (*ct->c_ceopenfnx) (ct, &file)) == NOTOK)