From: Paul Eggert Date: Tue, 15 Jul 2014 19:28:25 +0000 (-0700) Subject: Use "b" flag more consistently; avoid "t". X-Git-Tag: emacs-25.0.90~2636^2~15 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e6d13fea41769d1e66dd1c9cd8b6d61f96da39b;p=emacs.git Use "b" flag more consistently; avoid "t". * make-docfile.c (READ_TEXT): Remove; all uses replaced by "r". (READ_BINARY): Remove; all uses replaced by "rb". Fixes: debbugs:18006 --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index e108f5b2f5d..199d46f4984 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2014-07-15 Paul Eggert + + Use "b" flag more consistently; avoid "t" (Bug#18006). + * make-docfile.c (READ_TEXT): Remove; all uses replaced by "r". + (READ_BINARY): Remove; all uses replaced by "rb". + 2014-07-14 Paul Eggert Use binary-io module, O_BINARY, and "b" flag (Bug#18006). diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index cb0a56607f8..884b6c1001e 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -55,12 +55,8 @@ along with GNU Emacs. If not, see . */ Similarly, msdos defines this as sys_chdir, but we're not linking with the file where that function is defined. */ #undef chdir -#define READ_TEXT "rt" -#define READ_BINARY "rb" #define IS_SLASH(c) ((c) == '/' || (c) == '\\' || (c) == ':') #else /* not DOS_NT */ -#define READ_TEXT "r" -#define READ_BINARY "r" #define IS_SLASH(c) ((c) == '/') #endif /* not DOS_NT */ @@ -216,11 +212,11 @@ scan_file (char *filename) if (!generate_globals) put_filename (filename); if (len > 4 && !strcmp (filename + len - 4, ".elc")) - return scan_lisp_file (filename, READ_BINARY); + return scan_lisp_file (filename, "rb"); else if (len > 3 && !strcmp (filename + len - 3, ".el")) - return scan_lisp_file (filename, READ_TEXT); + return scan_lisp_file (filename, "r"); else - return scan_c_file (filename, READ_TEXT); + return scan_c_file (filename, "r"); } static void