aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-04-24 12:00:03 +0300
committerEli Zaretskii2011-04-24 12:00:03 +0300
commit762b15be8c7925c661e839fa41d46189513dfda6 (patch)
tree05540ae931986d38d8d4136b36923ee129daf8a5 /src
parentf1052e5d1b134c255b4fe7cd948681a0a9af9b63 (diff)
downloademacs-762b15be8c7925c661e839fa41d46189513dfda6.tar.gz
emacs-762b15be8c7925c661e839fa41d46189513dfda6.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/Makefile.in4
-rw-r--r--src/doc.c4
-rw-r--r--src/doprnt.c33
-rw-r--r--src/makefile.w32-in4
-rw-r--r--src/term.c4
6 files changed, 52 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 537acb712b9..478a5aa2512 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,7 +1,19 @@
12011-04-24 Eli Zaretskii <eliz@gnu.org> 12011-04-24 Eli Zaretskii <eliz@gnu.org>
2 2
3 * doc.c (get_doc_string): Improve the format passed to `error'.
4
5 * doprnt.c (doprnt): Improve commentary.
6
7 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
8
9 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
10 them with etags.
11
3 * makefile.w32-in (globals.h): Add a dummy recipe, to make any 12 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
4 changes in globals.h immediately force recompilation. 13 changes in globals.h immediately force recompilation.
14 (TAGS): Depend on $(CURDIR)/m/intel386.h and
15 $(CURDIR)/s/ms-w32.h.
16 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
5 17
6 * character.c (Fchar_direction): Function deleted. 18 * character.c (Fchar_direction): Function deleted.
7 (syms_of_character): Don't defsubr it. 19 (syms_of_character): Don't defsubr it.
diff --git a/src/Makefile.in b/src/Makefile.in
index e1195968f7f..8b596430cf5 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -748,10 +748,10 @@ extraclean: distclean
748ctagsfiles1 = [xyzXYZ]*.[hcm] 748ctagsfiles1 = [xyzXYZ]*.[hcm]
749ctagsfiles2 = [a-wA-W]*.[hcm] 749ctagsfiles2 = [a-wA-W]*.[hcm]
750 750
751TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) 751TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(M_FILE) $(S_FILE)
752 ../lib-src/etags --include=TAGS-LISP --include=$(lwlibdir)/TAGS \ 752 ../lib-src/etags --include=TAGS-LISP --include=$(lwlibdir)/TAGS \
753 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \ 753 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
754 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) 754 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(M_FILE) $(S_FILE)
755frc: 755frc:
756TAGS-LISP: frc 756TAGS-LISP: frc
757 $(MAKE) -f $(lispdir)/Makefile TAGS-LISP ETAGS=../lib-src/etags 757 $(MAKE) -f $(lispdir)/Makefile TAGS-LISP ETAGS=../lib-src/etags
diff --git a/src/doc.c b/src/doc.c
index 354aff84979..4b75deaba5c 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -253,7 +253,9 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
253 else if (c == '_') 253 else if (c == '_')
254 *to++ = 037; 254 *to++ = 037;
255 else 255 else
256 error ("Invalid data in documentation file -- ^A followed by code 0%o", c); 256 error ("\
257Invalid data in documentation file -- %c followed by code %03o",
258 1, (unsigned)c);
257 } 259 }
258 else 260 else
259 *to++ = *from++; 261 *to++ = *from++;
diff --git a/src/doprnt.c b/src/doprnt.c
index f182529b801..f124db13221 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -1,6 +1,6 @@
1/* Output like sprintf to a buffer of specified size. 1/* Output like sprintf to a buffer of specified size.
2 Also takes args differently: pass one pointer to an array of strings 2 Also takes args differently: pass one pointer to the end
3 in addition to the format string which is separate. 3 of the format string in addition to the format string itself.
4 Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. 4 Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
@@ -18,6 +18,35 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* If you think about replacing this with some similar standard C function of
22 the printf family (such as vsnprintf), please note that this function
23 supports the following Emacs-specific features:
24
25 . For %c conversions, it produces a string with the multibyte representation
26 of the (`int') argument, suitable for display in an Emacs buffer.
27
28 . For %s and %c, when field width is specified (e.g., %25s), it accounts for
29 the diplay width of each character, according to char-width-table. That
30 is, it does not assume that each character takes one column on display.
31
32 . If the size of the buffer is not enough to produce the formatted string in
33 its entirety, it makes sure that truncation does not chop the last
34 character in the middle of its multibyte sequence, producing an invalid
35 sequence.
36
37 . It accepts a pointer to the end of the format string, so the format string
38 could include embedded null characters.
39
40 . It signals an error if the length of the formatted string is about to
41 overflow MOST_POSITIVE_FIXNUM, to avoid producing strings longer than what
42 Emacs can handle.
43
44 OTOH, this function supports only a small subset of the standard C formatted
45 output facilities. E.g., %u and %ll are not supported, and precision is
46 largely ignored except for converting floating-point values. However, this
47 is okay, as this function is supposed to be called from `error' and similar
48 functions, and thus does not need to support features beyond those in
49 `Fformat', which is used by `error' on the Lisp level. */
21 50
22#include <config.h> 51#include <config.h>
23#include <stdio.h> 52#include <stdio.h>
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index eebc4006bc3..0dd06b7efc3 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -330,7 +330,7 @@ cleanall: clean
330## 330##
331## This works only with GNU Make. 331## This works only with GNU Make.
332 332
333TAGS: $(OBJ0) $(OBJ1) $(OBJ2) 333TAGS: $(OBJ0) $(OBJ1) $(OBJ2) $(CURDIR)/m/intel386.h $(CURDIR)/s/ms-w32.h
334 $(MAKE) $(MFLAGS) TAGS-$(MAKETYPE) 334 $(MAKE) $(MFLAGS) TAGS-$(MAKETYPE)
335 335
336TAGS-LISP: $(OBJ0) $(OBJ1) $(OBJ2) 336TAGS-LISP: $(OBJ0) $(OBJ1) $(OBJ2)
@@ -344,7 +344,7 @@ TAGS-gmake:
344 $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1)) 344 $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1))
345 ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \ 345 ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \
346 $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ2)) \ 346 $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ2)) \
347 $(CURDIR)/*.h 347 $(CURDIR)/*.h $(CURDIR)/m/intel386.h $(CURDIR)/s/ms-w32.h
348 348
349TAGS-nmake: 349TAGS-nmake:
350 echo This target is not supported with NMake 350 echo This target is not supported with NMake
diff --git a/src/term.c b/src/term.c
index cae83f4d269..28709138a17 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3121,7 +3121,7 @@ init_tty (const char *name, const char *terminal_type, int must_succeed)
3121 terminal = create_terminal (); 3121 terminal = create_terminal ();
3122#ifdef MSDOS 3122#ifdef MSDOS
3123 if (been_here > 0) 3123 if (been_here > 0)
3124 maybe_fatal (1, 0, "Attempt to create another terminal %s", "", 3124 maybe_fatal (0, 0, "Attempt to create another terminal %s", "",
3125 name, ""); 3125 name, "");
3126 been_here = 1; 3126 been_here = 1;
3127 tty = &the_only_display_info; 3127 tty = &the_only_display_info;
@@ -3627,7 +3627,7 @@ vfatal (const char *str, va_list ap)
3627 3627
3628/* Auxiliary error-handling function for init_tty. 3628/* Auxiliary error-handling function for init_tty.
3629 Delete TERMINAL, then call error or fatal with str1 or str2, 3629 Delete TERMINAL, then call error or fatal with str1 or str2,
3630 respectively, according to MUST_SUCCEED. */ 3630 respectively, according to whether MUST_SUCCEED is zero or not. */
3631 3631
3632static void 3632static void
3633maybe_fatal (int must_succeed, struct terminal *terminal, 3633maybe_fatal (int must_succeed, struct terminal *terminal,