X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lib-src%2Fmmencode.c;h=96fb29b605b2940adf7bab955f44121e4b5a6842;hp=8ba79d4657d546d3454c9714ec957f8e3f8e5161;hb=0c42ec05e3081f5227055048980ab1876f859447;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910 diff --git a/lib-src/mmencode.c b/lib-src/mmencode.c index 8ba79d4..96fb29b 100644 --- a/lib-src/mmencode.c +++ b/lib-src/mmencode.c @@ -18,6 +18,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. #include #include #include +#include static void output64chunk(int c1, int c2, int c3, int pads, FILE *outfile); @@ -52,9 +53,7 @@ char c; static int InNewline=0; static int -nextcharin(infile, PortableNewlines) -FILE *infile; -int PortableNewlines; +nextcharin (FILE *infile, int PortableNewlines) { int c; @@ -386,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 @@ -443,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 @@ -488,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 @@ -498,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);