comparison lib-src/b2m.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
17 17
18 /* Made conformant to the GNU coding standards January, 1995 18 /* Made conformant to the GNU coding standards January, 1995
19 by Francesco Potorti` <pot@cnuce.cnr.it>. */ 19 by Francesco Potorti` <pot@cnuce.cnr.it>. */
20 20
21 #ifdef HAVE_CONFIG_H 21 #ifdef HAVE_CONFIG_H
22 #include <config.h> 22 #include <../src/config.h>
23 /* On some systems, Emacs defines static as nothing for the sake 23 /* On some systems, Emacs defines static as nothing for the sake
24 of unexec. We don't want that here since we don't use unexec. */ 24 of unexec. We don't want that here since we don't use unexec. */
25 #undef static 25 #undef static
26 #endif 26 #endif
27 27
28 #include <stdio.h> 28 #include <stdio.h>
29 #include <stdlib.h> 29 #include <stdlib.h>
30 #include <string.h> 30 #include <string.h>
31 #include <time.h> 31 #include <time.h>
32 #include <sys/types.h> 32 #include <sys/types.h>
33 #ifdef WIN32_NATIVE 33 #ifdef MSDOS
34 #include <fcntl.h> 34 #include <fcntl.h>
35 #endif 35 #endif
36 36
37 #undef TRUE 37 #undef TRUE
38 #define TRUE 1 38 #define TRUE 1
86 logical labels_saved, printing, header; 86 logical labels_saved, printing, header;
87 time_t ltoday; 87 time_t ltoday;
88 char *labels = NULL, *p, *today; 88 char *labels = NULL, *p, *today;
89 struct linebuffer data; 89 struct linebuffer data;
90 90
91 #ifdef WIN32_NATIVE 91 #ifdef MSDOS
92 _fmode = O_BINARY; /* all of files are treated as binary files */ 92 _fmode = O_BINARY; /* all of files are treated as binary files */
93 #if __DJGPP__ > 1
93 if (!isatty (fileno (stdout))) 94 if (!isatty (fileno (stdout)))
94 setmode (fileno (stdout), O_BINARY); 95 setmode (fileno (stdout), O_BINARY);
95 if (!isatty (fileno (stdin))) 96 if (!isatty (fileno (stdin)))
96 setmode (fileno (stdin), O_BINARY); 97 setmode (fileno (stdin), O_BINARY);
98 #else /* not __DJGPP__ > 1 */
99 (stdout)->_flag &= ~_IOTEXT;
100 (stdin)->_flag &= ~_IOTEXT;
101 #endif /* not __DJGPP__ > 1 */
97 #endif 102 #endif
98 progname = argv[0]; 103 progname = argv[0];
99 104
100 if (argc != 1) 105 if (argc != 1)
101 { 106 {