comparison src/termcap.c @ 7685:5fbc009f3dc3

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Wed, 25 May 1994 23:06:05 +0000
parents 1f2f6bb3690f
children 8a5a170b8646
comparison
equal deleted inserted replaced
7684:ec7caebc4a1d 7685:5fbc009f3dc3
42 42
43 #endif /* not HAVE_CONFIG_H */ 43 #endif /* not HAVE_CONFIG_H */
44 44
45 #ifndef NULL 45 #ifndef NULL
46 #define NULL (char *) 0 46 #define NULL (char *) 0
47 #endif
48
49 #ifndef O_RDONLY
50 #define O_RDONLY 0
47 #endif 51 #endif
48 52
49 /* BUFSIZE is the initial size allocated for the buffer 53 /* BUFSIZE is the initial size allocated for the buffer
50 for reading the termcap file. 54 for reading the termcap file.
51 It is not a limit. 55 It is not a limit.
457 termcap_name = TERMCAP_NAME; 461 termcap_name = TERMCAP_NAME;
458 462
459 /* Here we know we must search a file and termcap_name has its name. */ 463 /* Here we know we must search a file and termcap_name has its name. */
460 464
461 #ifdef MSDOS 465 #ifdef MSDOS
462 fd = open (termcap_name, O_TEXT, 0); 466 fd = open (termcap_name, O_RDONLY|O_TEXT, 0);
463 #else 467 #else
464 fd = open (termcap_name, 0, 0); 468 fd = open (termcap_name, O_RDONLY, 0);
465 #endif 469 #endif
466 if (fd < 0) 470 if (fd < 0)
467 return -1; 471 return -1;
468 472
469 buf.size = BUFSIZE; 473 buf.size = BUFSIZE;