diff lib-src/hexl.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 84b14dcb0985
children abe6d1db359e
line wrap: on
line diff
--- a/lib-src/hexl.c	Mon Aug 13 11:32:27 2007 +0200
+++ b/lib-src/hexl.c	Mon Aug 13 11:33:38 2007 +0200
@@ -4,7 +4,8 @@
 
 #include <stdio.h>
 #include <ctype.h>
-#ifdef MSDOS
+#ifdef WINDOWSNT
+#include <io.h>
 #include <fcntl.h>
 #endif
 
@@ -141,9 +142,8 @@
 	{
 	  char buf[18];
 
-#ifdef MSDOS
-	  (stdout)->_flag &= ~_IOTEXT; /* print binary */
-	  _setmode (fileno (stdout), O_BINARY);
+#ifdef WINDOWSNT
+	  _setmode (_fileno (stdout), O_BINARY);
 #endif
 	  for (;;)
 	    {
@@ -185,9 +185,8 @@
 	}
       else
 	{
-#ifdef MSDOS
-	  (fp)->_flag &= ~_IOTEXT; /* read binary */
-	  _setmode (fileno (fp), O_BINARY);
+#ifdef WINDOWSNT
+	  _setmode (_fileno (fp), O_BINARY);
 #endif
 	  address = 0;
 	  string[0] = ' ';