diff options
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/make-docfile.c | 11 |
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 | { |