emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lib-src/sorted-doc.c


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/lib-src/sorted-doc.c
Date: Sat, 03 Jun 2006 14:51:25 +0000

Index: emacs/lib-src/sorted-doc.c
diff -u emacs/lib-src/sorted-doc.c:1.18 emacs/lib-src/sorted-doc.c:1.19
--- emacs/lib-src/sorted-doc.c:1.18     Sat Apr 29 22:15:04 2006
+++ emacs/lib-src/sorted-doc.c  Sat Jun  3 14:51:25 2006
@@ -29,9 +29,15 @@
 
 #include <stdio.h>
 #include <ctype.h>
+#ifdef DOS_NT
+#include <fcntl.h>             /* for O_BINARY */
+#include <io.h>                        /* for setmode */
+#endif
 #ifndef HAVE_STDLIB_H          /* config.h includes stdlib.  */
+#ifndef WINDOWSNT              /* src/s/ms-w32.h includes stdlib.h */
 extern char *malloc ();
 #endif
+#endif
 
 #define NUL    '\0'
 #define MARKER '\037'
@@ -134,6 +140,12 @@
   DOCSTR *docs = NULL;          /* chain of allocated DOCSTRS */
   char buf[512];               /* line buffer */
 
+#ifdef DOS_NT
+  /* DOC is a binary file.  */
+  if (!isatty (fileno (stdin)))
+    setmode (fileno (stdin), O_BINARY);
+#endif
+
   while (1)                    /* process one char at a time */
     {
       /* this char from the DOCSTR file */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]