aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-06-20 02:52:38 +0000
committerRichard M. Stallman1995-06-20 02:52:38 +0000
commit4e043ed3064fec8133ee4bf680c59b017c497515 (patch)
treeccb352ef1d4cd0ad95b8fdebd85a71500cf858ef /lib-src
parent3be2a3627fbfcab83cf04bd2c30d82dab4bc5855 (diff)
downloademacs-4e043ed3064fec8133ee4bf680c59b017c497515.tar.gz
emacs-4e043ed3064fec8133ee4bf680c59b017c497515.zip
(main): On MSDOS, don't change stdout to binary, and insist on an -o option.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/make-docfile.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 6f3c799c937..50b755b41bb 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -114,19 +114,23 @@ main (argc, argv)
114 114
115 progname = argv[0]; 115 progname = argv[0];
116 116
117 outfile = stdout;
118
117 /* Don't put CRs in the DOC file. */ 119 /* Don't put CRs in the DOC file. */
118#ifdef MSDOS 120#ifdef MSDOS
121#if 0 /* Suspicion is that this causes hanging.
122 So instead we require people to use -o on MSDOS. */
119 _fmode = O_BINARY; 123 _fmode = O_BINARY;
120 (stdout)->_flag &= ~_IOTEXT; 124 (stdout)->_flag &= ~_IOTEXT;
121 _setmode (fileno (stdout), O_BINARY); 125 _setmode (fileno (stdout), O_BINARY);
126#endif
127 outfile = 0;
122#endif /* MSDOS */ 128#endif /* MSDOS */
123#ifdef WINDOWSNT 129#ifdef WINDOWSNT
124 _fmode = O_BINARY; 130 _fmode = O_BINARY;
125 _setmode (fileno (stdout), O_BINARY); 131 _setmode (fileno (stdout), O_BINARY);
126#endif /* WINDOWSNT */ 132#endif /* WINDOWSNT */
127 133
128 outfile = stdout;
129
130 /* If first two args are -o FILE, output to FILE. */ 134 /* If first two args are -o FILE, output to FILE. */
131 i = 1; 135 i = 1;
132 if (argc > i + 1 && !strcmp (argv[i], "-o")) 136 if (argc > i + 1 && !strcmp (argv[i], "-o"))
@@ -145,6 +149,9 @@ main (argc, argv)
145 i += 2; 149 i += 2;
146 } 150 }
147 151
152 if (outfile == 0)
153 fatal ("No output file specified", "");
154
148 first_infile = i; 155 first_infile = i;
149 for (; i < argc; i++) 156 for (; i < argc; i++)
150 { 157 {