aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2002-03-11 18:42:35 +0000
committerGerd Moellmann2002-03-11 18:42:35 +0000
commit714d8c393b62d807603e74e553e254ede8f18d39 (patch)
tree91fcf7084674cbf85ea6a215cfd6a476676f424b /src
parentb3f1e48a47d5ef1a397a4244e3203acc7aa29f87 (diff)
downloademacs-714d8c393b62d807603e74e553e254ede8f18d39.tar.gz
emacs-714d8c393b62d807603e74e553e254ede8f18d39.zip
(Fload): Don't assume that message_with_ntring uses the
string it is given like a C string.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/lread.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ba5eaa43fe0..ec86d1539c1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12002-03-11 Gerd Moellmann <gerd@gnu.org>
2
3 * lread.c (Fload): Don't assume that message_with_ntring uses the
4 string it is given like a C string.
5
12002-03-10 Jan D. <Jan.Djarv@mbox200.swipnet.se> 62002-03-10 Jan D. <Jan.Djarv@mbox200.swipnet.se>
2 7
3 * xterm.h: Extern declare x_session_check_input () and 8 * xterm.h: Extern declare x_session_check_input () and
diff --git a/src/lread.c b/src/lread.c
index 9e2687e272b..81ae1f27a55 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -776,17 +776,22 @@ Return t if file exists. */)
776 stat ((char *)XSTRING (found)->data, &s1); 776 stat ((char *)XSTRING (found)->data, &s1);
777 XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 0; 777 XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 0;
778 result = stat ((char *)XSTRING (found)->data, &s2); 778 result = stat ((char *)XSTRING (found)->data, &s2);
779 XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 'c';
780
779 if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime) 781 if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime)
780 { 782 {
781 /* Make the progress messages mention that source is newer. */ 783 /* Make the progress messages mention that source is newer. */
782 newer = 1; 784 newer = 1;
783 785
784 /* If we won't print another message, mention this anyway. */ 786 /* If we won't print another message, mention this anyway. */
785 if (! NILP (nomessage)) 787 if (!NILP (nomessage))
786 message_with_string ("Source file `%s' newer than byte-compiled file", 788 {
787 found, 1); 789 Lisp_Object file;
790 file = Fsubstring (found, make_number (0), make_number (-1));
791 message_with_string ("Source file `%s' newer than byte-compiled file",
792 file, SMBP (file));
793 }
788 } 794 }
789 XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 'c';
790 } 795 }
791 } 796 }
792 else 797 else