aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert2014-07-15 12:28:25 -0700
committerPaul Eggert2014-07-15 12:28:25 -0700
commit7e6d13fea41769d1e66dd1c9cd8b6d61f96da39b (patch)
treedff93a41569fab1ec0c16898a166a538eed684f1 /lib-src
parent6f50c78e70c41c36e56cac89728650d8a049bbeb (diff)
downloademacs-7e6d13fea41769d1e66dd1c9cd8b6d61f96da39b.tar.gz
emacs-7e6d13fea41769d1e66dd1c9cd8b6d61f96da39b.zip
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
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/make-docfile.c10
2 files changed, 9 insertions, 7 deletions
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 @@
12014-07-15 Paul Eggert <eggert@cs.ucla.edu>
2
3 Use "b" flag more consistently; avoid "t" (Bug#18006).
4 * make-docfile.c (READ_TEXT): Remove; all uses replaced by "r".
5 (READ_BINARY): Remove; all uses replaced by "rb".
6
12014-07-14 Paul Eggert <eggert@cs.ucla.edu> 72014-07-14 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Use binary-io module, O_BINARY, and "b" flag (Bug#18006). 9 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 <http://www.gnu.org/licenses/>. */
55 Similarly, msdos defines this as sys_chdir, but we're not linking with the 55 Similarly, msdos defines this as sys_chdir, but we're not linking with the
56 file where that function is defined. */ 56 file where that function is defined. */
57#undef chdir 57#undef chdir
58#define READ_TEXT "rt"
59#define READ_BINARY "rb"
60#define IS_SLASH(c) ((c) == '/' || (c) == '\\' || (c) == ':') 58#define IS_SLASH(c) ((c) == '/' || (c) == '\\' || (c) == ':')
61#else /* not DOS_NT */ 59#else /* not DOS_NT */
62#define READ_TEXT "r"
63#define READ_BINARY "r"
64#define IS_SLASH(c) ((c) == '/') 60#define IS_SLASH(c) ((c) == '/')
65#endif /* not DOS_NT */ 61#endif /* not DOS_NT */
66 62
@@ -216,11 +212,11 @@ scan_file (char *filename)
216 if (!generate_globals) 212 if (!generate_globals)
217 put_filename (filename); 213 put_filename (filename);
218 if (len > 4 && !strcmp (filename + len - 4, ".elc")) 214 if (len > 4 && !strcmp (filename + len - 4, ".elc"))
219 return scan_lisp_file (filename, READ_BINARY); 215 return scan_lisp_file (filename, "rb");
220 else if (len > 3 && !strcmp (filename + len - 3, ".el")) 216 else if (len > 3 && !strcmp (filename + len - 3, ".el"))
221 return scan_lisp_file (filename, READ_TEXT); 217 return scan_lisp_file (filename, "r");
222 else 218 else
223 return scan_c_file (filename, READ_TEXT); 219 return scan_c_file (filename, "r");
224} 220}
225 221
226static void 222static void