[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103985: Fallout from resurrecting do
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103985: Fallout from resurrecting doprnt. |
Date: |
Sun, 24 Apr 2011 12:00:03 +0300 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 103985
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2011-04-24 12:00:03 +0300
message:
Fallout from resurrecting doprnt.
src/doc.c (get_doc_string): Improve the format passed to `error'.
src/doprnt.c (doprnt): Improve commentary.
src/term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
src/Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
them with etags.
src/makefile.w32-in (TAGS): Depend on $(CURDIR)/m/intel386.h and
$(CURDIR)/s/ms-w32.h.
(TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
modified:
src/ChangeLog
src/Makefile.in
src/doc.c
src/doprnt.c
src/makefile.w32-in
src/term.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-04-24 07:15:17 +0000
+++ b/src/ChangeLog 2011-04-24 09:00:03 +0000
@@ -1,7 +1,19 @@
2011-04-24 Eli Zaretskii <address@hidden>
+ * doc.c (get_doc_string): Improve the format passed to `error'.
+
+ * doprnt.c (doprnt): Improve commentary.
+
+ * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
+
+ * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
+ them with etags.
+
* makefile.w32-in (globals.h): Add a dummy recipe, to make any
changes in globals.h immediately force recompilation.
+ (TAGS): Depend on $(CURDIR)/m/intel386.h and
+ $(CURDIR)/s/ms-w32.h.
+ (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
* character.c (Fchar_direction): Function deleted.
(syms_of_character): Don't defsubr it.
=== modified file 'src/Makefile.in'
--- a/src/Makefile.in 2011-04-23 10:33:28 +0000
+++ b/src/Makefile.in 2011-04-24 09:00:03 +0000
@@ -748,10 +748,10 @@
ctagsfiles1 = [xyzXYZ]*.[hcm]
ctagsfiles2 = [a-wA-W]*.[hcm]
-TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
+TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(M_FILE) $(S_FILE)
../lib-src/etags --include=TAGS-LISP --include=$(lwlibdir)/TAGS \
--regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
- $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
+ $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(M_FILE) $(S_FILE)
frc:
TAGS-LISP: frc
$(MAKE) -f $(lispdir)/Makefile TAGS-LISP ETAGS=../lib-src/etags
=== modified file 'src/doc.c'
--- a/src/doc.c 2011-04-14 19:34:42 +0000
+++ b/src/doc.c 2011-04-24 09:00:03 +0000
@@ -253,7 +253,9 @@
else if (c == '_')
*to++ = 037;
else
- error ("Invalid data in documentation file -- ^A followed by code
0%o", c);
+ error ("\
+Invalid data in documentation file -- %c followed by code %03o",
+ 1, (unsigned)c);
}
else
*to++ = *from++;
=== modified file 'src/doprnt.c'
--- a/src/doprnt.c 2011-04-23 10:33:28 +0000
+++ b/src/doprnt.c 2011-04-24 09:00:03 +0000
@@ -1,6 +1,6 @@
/* Output like sprintf to a buffer of specified size.
- Also takes args differently: pass one pointer to an array of strings
- in addition to the format string which is separate.
+ Also takes args differently: pass one pointer to the end
+ of the format string in addition to the format string itself.
Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -18,6 +18,35 @@
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
+/* If you think about replacing this with some similar standard C function of
+ the printf family (such as vsnprintf), please note that this function
+ supports the following Emacs-specific features:
+
+ . For %c conversions, it produces a string with the multibyte representation
+ of the (`int') argument, suitable for display in an Emacs buffer.
+
+ . For %s and %c, when field width is specified (e.g., %25s), it accounts for
+ the diplay width of each character, according to char-width-table. That
+ is, it does not assume that each character takes one column on display.
+
+ . If the size of the buffer is not enough to produce the formatted string in
+ its entirety, it makes sure that truncation does not chop the last
+ character in the middle of its multibyte sequence, producing an invalid
+ sequence.
+
+ . It accepts a pointer to the end of the format string, so the format string
+ could include embedded null characters.
+
+ . It signals an error if the length of the formatted string is about to
+ overflow MOST_POSITIVE_FIXNUM, to avoid producing strings longer than what
+ Emacs can handle.
+
+ OTOH, this function supports only a small subset of the standard C formatted
+ output facilities. E.g., %u and %ll are not supported, and precision is
+ largely ignored except for converting floating-point values. However, this
+ is okay, as this function is supposed to be called from `error' and similar
+ functions, and thus does not need to support features beyond those in
+ `Fformat', which is used by `error' on the Lisp level. */
#include <config.h>
#include <stdio.h>
=== modified file 'src/makefile.w32-in'
--- a/src/makefile.w32-in 2011-04-24 07:15:17 +0000
+++ b/src/makefile.w32-in 2011-04-24 09:00:03 +0000
@@ -330,7 +330,7 @@
##
## This works only with GNU Make.
-TAGS: $(OBJ0) $(OBJ1) $(OBJ2)
+TAGS: $(OBJ0) $(OBJ1) $(OBJ2) $(CURDIR)/m/intel386.h $(CURDIR)/s/ms-w32.h
$(MAKE) $(MFLAGS) TAGS-$(MAKETYPE)
TAGS-LISP: $(OBJ0) $(OBJ1) $(OBJ2)
@@ -344,7 +344,7 @@
$(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1))
../lib-src/$(BLD)/etags.exe -a address@hidden/nt/emacs-src.tags \
$(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ2)) \
- $(CURDIR)/*.h
+ $(CURDIR)/*.h $(CURDIR)/m/intel386.h $(CURDIR)/s/ms-w32.h
TAGS-nmake:
echo This target is not supported with NMake
=== modified file 'src/term.c'
--- a/src/term.c 2011-04-18 23:21:31 +0000
+++ b/src/term.c 2011-04-24 09:00:03 +0000
@@ -3121,7 +3121,7 @@
terminal = create_terminal ();
#ifdef MSDOS
if (been_here > 0)
- maybe_fatal (1, 0, "Attempt to create another terminal %s", "",
+ maybe_fatal (0, 0, "Attempt to create another terminal %s", "",
name, "");
been_here = 1;
tty = &the_only_display_info;
@@ -3627,7 +3627,7 @@
/* Auxiliary error-handling function for init_tty.
Delete TERMINAL, then call error or fatal with str1 or str2,
- respectively, according to MUST_SUCCEED. */
+ respectively, according to whether MUST_SUCCEED is zero or not. */
static void
maybe_fatal (int must_succeed, struct terminal *terminal,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103985: Fallout from resurrecting doprnt.,
Eli Zaretskii <=