Commit 659d3b43 authored by Richard M. Stallman's avatar Richard M. Stallman

[DJGPP v2]: Include io.h.

(main) [DJGPP v2]: Switch standard streams to binary with setmode.
parent b696f860
......@@ -2,6 +2,9 @@
#include <ctype.h>
#ifdef MSDOS
#include <fcntl.h>
#if __DJGPP__ >= 2
#include <io.h>
#endif
#endif
#define DEFAULT_GROUPING 0x01
......@@ -134,8 +137,12 @@ main (argc, argv)
char buf[18];
#ifdef MSDOS
#if __DJGPP__ >= 2
setmode (fileno (stdout), O_BINARY);
#else
(stdout)->_flag &= ~_IOTEXT; /* print binary */
_setmode (fileno (stdout), O_BINARY);
#endif
#endif
for (;;)
{
......@@ -178,8 +185,12 @@ main (argc, argv)
else
{
#ifdef MSDOS
#if __DJGPP__ >= 2
setmode (fileno (stdout), O_BINARY);
#else
(fp)->_flag &= ~_IOTEXT; /* read binary */
_setmode (fileno (fp), O_BINARY);
#endif
#endif
address = 0;
string[0] = ' ';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment