summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>1998-05-04 15:32:44 +0000
committerEli Zaretskii <eliz@gnu.org>1998-05-04 15:32:44 +0000
commit229ba775d49f74c1144b583e1de6aef66f9fefdd (patch)
tree52f6ab06d26661ab68c36d1efa190c188633a92c /src/lread.c
parent67d3b149e2cdd55db5091fb0e3f9029cbf516819 (diff)
downloademacs-229ba775d49f74c1144b583e1de6aef66f9fefdd.tar.gz
(Fload): Rename dosmode to fmode and use it on all
platforms. Avoid calling fdopen only for WINDOWSNT, use fdopen for the the MSDOS version. (read1): Avoid recording doc strings positions only for WINDOWSNT, not for MSDOS.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lread.c b/src/lread.c
index 1f4a8c5e093..755c6ec1d0a 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -475,8 +475,9 @@ Return t if file exists.")
/* 1 means we are loading a compiled file. */
int compiled = 0;
Lisp_Object handler;
+ char *fmode = "r";
#ifdef DOS_NT
- char *dosmode = "rt";
+ fmode = "rt";
#endif /* DOS_NT */
CHECK_STRING (file, 0);
@@ -548,7 +549,7 @@ Return t if file exists.")
compiled = 1;
#ifdef DOS_NT
- dosmode = "rb";
+ fmode = "rb";
#endif /* DOS_NT */
stat ((char *)XSTRING (found)->data, &s1);
XSTRING (found)->data[XSTRING (found)->size - 1] = 0;
@@ -577,12 +578,12 @@ Return t if file exists.")
}
}
-#ifdef DOS_NT
+#ifdef WINDOWSNT
close (fd);
- stream = fopen ((char *) XSTRING (found)->data, dosmode);
-#else /* not DOS_NT */
- stream = fdopen (fd, "r");
-#endif /* not DOS_NT */
+ stream = fopen ((char *) XSTRING (found)->data, fmode);
+#else /* not WINDOWSNT */
+ stream = fdopen (fd, fmode);
+#endif /* not WINDOWSNT */
if (stream == 0)
{
close (fd);
@@ -1581,7 +1582,7 @@ read1 (readcharfun, pch, first_in_list)
if (c >= 0)
UNREAD (c);
-#ifndef DOS_NT /* I don't know if filepos works right on MSDOS and Windoze. */
+#ifndef WINDOWSNT /* I don't know if filepos works right on Windoze. */
if (load_force_doc_strings && EQ (readcharfun, Qget_file_char))
{
/* If we are supposed to force doc strings into core right now,
@@ -1608,7 +1609,7 @@ read1 (readcharfun, pch, first_in_list)
saved_doc_string_length = i;
}
else
-#endif /* not DOS_NT */
+#endif /* not WINDOWSNT */
{
/* Skip that many characters. */
for (i = 0; i < nskip && c >= 0; i++)