# HG changeset patch # User Eli Zaretskii # Date 1149347089 0 # Node ID 2a9a6318a6db4901ca7c37cbff69a61c7216bbd9 # Parent 036770549c0306f8abdfc2c52e57dd1d9d054095 [DOS_NT] : Include fcntl.h and io.h. (main) [DOS_NT]: Switch stdin to binary mode, if it is not a terminal device. diff -r 036770549c03 -r 2a9a6318a6db lib-src/digest-doc.c --- a/lib-src/digest-doc.c Sat Jun 03 14:58:50 2006 +0000 +++ b/lib-src/digest-doc.c Sat Jun 03 15:04:49 2006 +0000 @@ -26,12 +26,23 @@ #include +#ifdef DOS_NT +#include /* for O_BINARY */ +#include /* for setmode */ +#endif + int main () { register int ch; register int notfirst = 0; +#ifdef DOS_NT + /* DOC is a binary file. */ + if (!isatty (fileno (stdin))) + setmode (fileno (stdin), O_BINARY); +#endif + printf (".TL\n"); printf ("Command Summary for GNU Emacs\n"); printf (".AU\nRichard M. Stallman\n");