aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/sorted-doc.c
diff options
context:
space:
mode:
authorKaroly Lorentey2006-06-12 07:27:12 +0000
committerKaroly Lorentey2006-06-12 07:27:12 +0000
commit476e9367ec1f440aa23904b7bc482ea4a3b8041c (patch)
tree4f7f5a5e9a6668f908834bb6e216c8fa3727d4b3 /lib-src/sorted-doc.c
parenta13f8f50d4cc544d3bbfa78568e82ce09e68bded (diff)
parent6b519504c3297595101628e823e72c91e562ab45 (diff)
downloademacs-476e9367ec1f440aa23904b7bc482ea4a3b8041c.tar.gz
emacs-476e9367ec1f440aa23904b7bc482ea4a3b8041c.zip
Merged from emacs@sv.gnu.org.
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-294 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-295 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-296 Update from CVS: admin/FOR-RELEASE: Update refcard section. * emacs@sv.gnu.org/emacs--devo--0--patch-297 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-298 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-299 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-300 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-301 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-302 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-303 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-304 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-103 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-104 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-570
Diffstat (limited to 'lib-src/sorted-doc.c')
-rw-r--r--lib-src/sorted-doc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c
index 0a06aa2c984..a8b2d441f9a 100644
--- a/lib-src/sorted-doc.c
+++ b/lib-src/sorted-doc.c
@@ -29,9 +29,15 @@
29 29
30#include <stdio.h> 30#include <stdio.h>
31#include <ctype.h> 31#include <ctype.h>
32#ifdef DOS_NT
33#include <fcntl.h> /* for O_BINARY */
34#include <io.h> /* for setmode */
35#endif
32#ifndef HAVE_STDLIB_H /* config.h includes stdlib. */ 36#ifndef HAVE_STDLIB_H /* config.h includes stdlib. */
37#ifndef WINDOWSNT /* src/s/ms-w32.h includes stdlib.h */
33extern char *malloc (); 38extern char *malloc ();
34#endif 39#endif
40#endif
35 41
36#define NUL '\0' 42#define NUL '\0'
37#define MARKER '\037' 43#define MARKER '\037'
@@ -134,6 +140,14 @@ main ()
134 DOCSTR *docs = NULL; /* chain of allocated DOCSTRS */ 140 DOCSTR *docs = NULL; /* chain of allocated DOCSTRS */
135 char buf[512]; /* line buffer */ 141 char buf[512]; /* line buffer */
136 142
143#ifdef DOS_NT
144 /* DOC is a binary file. */
145 if (!isatty (fileno (stdin)))
146 setmode (fileno (stdin), O_BINARY);
147#endif
148
149 bp = buf;
150
137 while (1) /* process one char at a time */ 151 while (1) /* process one char at a time */
138 { 152 {
139 /* this char from the DOCSTR file */ 153 /* this char from the DOCSTR file */