comparison 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
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
2 2
3 #include <config.h> 3 #include <config.h>
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 #include <ctype.h> 6 #include <ctype.h>
7 #ifdef MSDOS 7 #ifdef WINDOWSNT
8 #include <io.h>
8 #include <fcntl.h> 9 #include <fcntl.h>
9 #endif 10 #endif
10 11
11 #if __STDC__ || defined(STDC_HEADERS) 12 #if __STDC__ || defined(STDC_HEADERS)
12 #include <stdlib.h> 13 #include <stdlib.h>
139 140
140 if (un_flag) 141 if (un_flag)
141 { 142 {
142 char buf[18]; 143 char buf[18];
143 144
144 #ifdef MSDOS 145 #ifdef WINDOWSNT
145 (stdout)->_flag &= ~_IOTEXT; /* print binary */ 146 _setmode (_fileno (stdout), O_BINARY);
146 _setmode (fileno (stdout), O_BINARY);
147 #endif 147 #endif
148 for (;;) 148 for (;;)
149 { 149 {
150 register int i, c, d; 150 register int i, c, d;
151 151
183 } 183 }
184 } 184 }
185 } 185 }
186 else 186 else
187 { 187 {
188 #ifdef MSDOS 188 #ifdef WINDOWSNT
189 (fp)->_flag &= ~_IOTEXT; /* read binary */ 189 _setmode (_fileno (fp), O_BINARY);
190 _setmode (fileno (fp), O_BINARY);
191 #endif 190 #endif
192 address = 0; 191 address = 0;
193 string[0] = ' '; 192 string[0] = ' ';
194 string[17] = '\0'; 193 string[17] = '\0';
195 for (;;) 194 for (;;)