X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lib-src%2Fmmencode.c;h=7dcb0e62d41b7c33ce5901f9d1130a3e9ef597f3;hb=c72d271c3325b14b8f28639e8108836675ee80ff;hp=6287ca2af1cdf481f91ff05643ca0fbb4ca29409;hpb=b73e352f264e9da0a00159dc29f318305cbe8636;p=chise%2Fxemacs-chise.git.1 diff --git a/lib-src/mmencode.c b/lib-src/mmencode.c index 6287ca2..7dcb0e6 100644 --- a/lib-src/mmencode.c +++ b/lib-src/mmencode.c @@ -349,7 +349,7 @@ toqp(FILE *infile, FILE *outfile) static void fromqp(FILE *infile, FILE *outfile, char **boundaries, int *boundaryct) { - unsigned int c1, c2; + int c1, c2; int sawnewline = 1, neednewline = 0; /* The neednewline hack is necessary because the newline leading into a multipart boundary is part of the boundary, not the data */ @@ -385,7 +385,7 @@ fromqp(FILE *infile, FILE *outfile, char **boundaries, int *boundaryct) putc(c1<<4 | c2, outfile); } } else { -#ifdef MSDOS +#ifdef WIN32_NATIVE if (*s == '\n') putc('\r', outfile); /* insert CR for binary-mode write */ #endif @@ -442,7 +442,8 @@ MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. */ -#ifdef MSDOS +#ifdef WIN32_NATIVE +#include #include #endif @@ -487,7 +488,7 @@ int main(int argc, char *argv[]) exit(-1); } } else { -#ifdef MSDOS +#ifdef WIN32_NATIVE if (encode) fp = fopen(argv[i], "rb"); else @@ -497,16 +498,16 @@ int main(int argc, char *argv[]) } /* else */ #else fp = fopen(argv[i], "r"); -#endif /* MSDOS */ +#endif /* WIN32_NATIVE */ if (!fp) { perror(argv[i]); exit(-1); } } } -#ifdef MSDOS +#ifdef WIN32_NATIVE if (fp == stdin) setmode(fileno(fp), O_BINARY); -#endif /* MSDOS */ +#endif /* WIN32_NATIVE */ if (which == BASE64) { if (encode) { to64(fp, fpo, portablenewlines);