comparison lib-src/make-docfile.c @ 9772:20652342eb9a

(main) [WINDOWSNT]: Now sets _fmode and stdout to O_BINARY. [WINDOWSNT]: Include the NT headers. (READ_TEXT, READ_BINARY): Test DOS_NT, not MS_DOS.
author Richard M. Stallman <rms@gnu.org>
date Tue, 01 Nov 1994 05:23:42 +0000
parents 5d1e70b22a93
children 3e2571e22b61
comparison
equal deleted inserted replaced
9771:3a51735d4a55 9772:20652342eb9a
33 33
34 #include <stdio.h> 34 #include <stdio.h>
35 #ifdef MSDOS 35 #ifdef MSDOS
36 #include <fcntl.h> 36 #include <fcntl.h>
37 #endif /* MSDOS */ 37 #endif /* MSDOS */
38 38 #ifdef WINDOWSNT
39 #ifdef MSDOS 39 #include <stdlib.h>
40 #include <fcntl.h>
41 #include <direct.h>
42 #endif /* WINDOWSNT */
43
44 #ifdef DOS_NT
40 #define READ_TEXT "rt" 45 #define READ_TEXT "rt"
41 #define READ_BINARY "rb" 46 #define READ_BINARY "rb"
42 #else /* not MSDOS */ 47 #else /* not DOS_NT */
43 #define READ_TEXT "r" 48 #define READ_TEXT "r"
44 #define READ_BINARY "r" 49 #define READ_BINARY "r"
45 #endif /* not MSDOS */ 50 #endif /* not DOS_NT */
46 51
47 int scan_file (); 52 int scan_file ();
48 int scan_lisp_file (); 53 int scan_lisp_file ();
49 int scan_c_file (); 54 int scan_c_file ();
50 55
57 { 62 {
58 int i; 63 int i;
59 int err_count = 0; 64 int err_count = 0;
60 int first_infile; 65 int first_infile;
61 66
67 /* Don't put CRs in the DOC file. */
62 #ifdef MSDOS 68 #ifdef MSDOS
63 _fmode = O_BINARY; /* all of files are treated as binary files */ 69 _fmode = O_BINARY;
64 (stdout)->_flag &= ~_IOTEXT; 70 (stdout)->_flag &= ~_IOTEXT;
65 _setmode (fileno (stdout), O_BINARY); 71 _setmode (fileno (stdout), O_BINARY);
66 #endif /* MSDOS */ 72 #endif /* MSDOS */
73 #ifdef WINDOWSNT
74 _fmode = O_BINARY;
75 _setmode (fileno (stdout), O_BINARY);
76 #endif /* WINDOWSNT */
77
67 outfile = stdout; 78 outfile = stdout;
68 79
69 /* If first two args are -o FILE, output to FILE. */ 80 /* If first two args are -o FILE, output to FILE. */
70 i = 1; 81 i = 1;
71 if (argc > i + 1 && !strcmp (argv[i], "-o")) 82 if (argc > i + 1 && !strcmp (argv[i], "-o"))