diff lib-src/mmencode.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children 11054d720c21
line wrap: on
line diff
--- a/lib-src/mmencode.c	Mon Aug 13 11:19:22 2007 +0200
+++ b/lib-src/mmencode.c	Mon Aug 13 11:20:41 2007 +0200
@@ -18,7 +18,6 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
-#include <errno.h>
 
 static void
 output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);
@@ -53,7 +52,9 @@
 static int InNewline=0;
 
 static int
-nextcharin (FILE *infile, int PortableNewlines)
+nextcharin(infile, PortableNewlines)
+FILE *infile;
+int PortableNewlines;
 {
     int c;
 
@@ -385,7 +386,7 @@
                         putc(c1<<4 | c2, outfile);
                     }
                 } else {
-#ifdef WIN32_NATIVE
+#ifdef MSDOS
                     if (*s == '\n')
                         putc('\r', outfile);	/* insert CR for binary-mode write */
 #endif
@@ -442,8 +443,7 @@
 OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
 WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
 */
-#ifdef WIN32_NATIVE
-#include <io.h>
+#ifdef MSDOS
 #include <fcntl.h>
 #endif
 
@@ -488,7 +488,7 @@
                     exit(-1);
             }
         } else {
-#ifdef WIN32_NATIVE
+#ifdef MSDOS
             if (encode)
                 fp = fopen(argv[i], "rb");
             else
@@ -498,16 +498,16 @@
             } /* else */
 #else
             fp = fopen(argv[i], "r");
-#endif /* WIN32_NATIVE */
+#endif /* MSDOS */
             if (!fp) {
                 perror(argv[i]);
                 exit(-1);
             }
         }
     }
-#ifdef WIN32_NATIVE
+#ifdef MSDOS
     if (fp == stdin) setmode(fileno(fp), O_BINARY);
-#endif /* WIN32_NATIVE */
+#endif /* MSDOS */
     if (which == BASE64) {
         if (encode) {
             to64(fp, fpo, portablenewlines);