diff options
| author | Eli Zaretskii | 2006-06-03 15:05:05 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-06-03 15:05:05 +0000 |
| commit | 1b178b9902fce72c5e08cb0ef6527615477f510f (patch) | |
| tree | 659056752018be11eafadf031d19352b22b83d70 /lib-src | |
| parent | 37c49f02a0e237509b8b8e200d8cc0f1baa46843 (diff) | |
| download | emacs-1b178b9902fce72c5e08cb0ef6527615477f510f.tar.gz emacs-1b178b9902fce72c5e08cb0ef6527615477f510f.zip | |
[DOS_NT] <top level>: Include fcntl.h and io.h.
(main) [DOS_NT]: Switch stdin to binary mode, if it is not a terminal device.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 5 | ||||
| -rw-r--r-- | lib-src/digest-doc.c | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 61e0d42ab1c..c448ac31c5d 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,9 +1,14 @@ | |||
| 1 | 2006-06-03 Eli Zaretskii <eliz@gnu.org> | 1 | 2006-06-03 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * digest-doc.c [DOS_NT] <top level>: Include fcntl.h and io.h. | ||
| 4 | (main) [DOS_NT]: Switch stdin to binary mode, if it is not a | ||
| 5 | terminal device. | ||
| 6 | |||
| 3 | * sorted-doc.c [DOS_NT] <top level>: Include fcntl.h and io.h. | 7 | * sorted-doc.c [DOS_NT] <top level>: Include fcntl.h and io.h. |
| 4 | [WINDOWSNT] <top level>: Don't redeclare malloc. | 8 | [WINDOWSNT] <top level>: Don't redeclare malloc. |
| 5 | (main) [DOS_NT]: Switch stdin to binary mode, if it is not a | 9 | (main) [DOS_NT]: Switch stdin to binary mode, if it is not a |
| 6 | terminal device. | 10 | terminal device. |
| 11 | (main): Initialize bp, to avoid compiler warnings | ||
| 7 | 12 | ||
| 8 | * makefile.w32-in: Delete traces of leditcfns.c. | 13 | * makefile.w32-in: Delete traces of leditcfns.c. |
| 9 | 14 | ||
diff --git a/lib-src/digest-doc.c b/lib-src/digest-doc.c index 7b5a9677e7c..7787d422e39 100644 --- a/lib-src/digest-doc.c +++ b/lib-src/digest-doc.c | |||
| @@ -26,12 +26,23 @@ | |||
| 26 | 26 | ||
| 27 | #include <stdio.h> | 27 | #include <stdio.h> |
| 28 | 28 | ||
| 29 | #ifdef DOS_NT | ||
| 30 | #include <fcntl.h> /* for O_BINARY */ | ||
| 31 | #include <io.h> /* for setmode */ | ||
| 32 | #endif | ||
| 33 | |||
| 29 | int | 34 | int |
| 30 | main () | 35 | main () |
| 31 | { | 36 | { |
| 32 | register int ch; | 37 | register int ch; |
| 33 | register int notfirst = 0; | 38 | register int notfirst = 0; |
| 34 | 39 | ||
| 40 | #ifdef DOS_NT | ||
| 41 | /* DOC is a binary file. */ | ||
| 42 | if (!isatty (fileno (stdin))) | ||
| 43 | setmode (fileno (stdin), O_BINARY); | ||
| 44 | #endif | ||
| 45 | |||
| 35 | printf (".TL\n"); | 46 | printf (".TL\n"); |
| 36 | printf ("Command Summary for GNU Emacs\n"); | 47 | printf ("Command Summary for GNU Emacs\n"); |
| 37 | printf (".AU\nRichard M. Stallman\n"); | 48 | printf (".AU\nRichard M. Stallman\n"); |