diff options
| author | Miles Bader | 2006-06-07 18:05:10 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-06-07 18:05:10 +0000 |
| commit | b883cdb2fefa8ea9c3b0d82eba7a9ee792f871bb (patch) | |
| tree | de3804210a8cd955e0d3b9abc15679480930bc82 /lib-src/sorted-doc.c | |
| parent | 885b7d0991bd4b4b8f4bd1d3cd21c18a697bbce2 (diff) | |
| parent | 26c9afc3239e18b03537faaea33e3e82e28099e6 (diff) | |
| download | emacs-b883cdb2fefa8ea9c3b0d82eba7a9ee792f871bb.tar.gz emacs-b883cdb2fefa8ea9c3b0d82eba7a9ee792f871bb.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 285-296)
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: admin/FOR-RELEASE: Update refcard section.
* gnus--rel--5.10 (patch 102-104)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-64
Diffstat (limited to 'lib-src/sorted-doc.c')
| -rw-r--r-- | lib-src/sorted-doc.c | 14 |
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 */ | ||
| 33 | extern char *malloc (); | 38 | extern 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 */ |