Mercurial > hg > xemacs-beta
changeset 831:5d09ddada9ae
[xemacs-hg @ 2002-05-09 07:15:20 by ben]
fix two bugs noted by Steve
doprnt.c: Use make_int() not make_char() when error about bad charval,
or abort will occur.
extents.c: Loop over children, not ourself -- avoid infinite loop.
lisp-disunion.h, lisp-union.h: Rename make_char() to make_char_1 for error-checking purposes.
lread.c: Syntax error if escape is outside of ISO-8859-1 range.
Remove hopelessly broken (and unworkable) FSF_KEYS code.
mule-coding.c, search.c: Spacing changes.
text.h: New make_char() -- verify that the char value is legal.
author | ben |
---|---|
date | Thu, 09 May 2002 07:16:38 +0000 |
parents | 20baef34a0b0 |
children | f3244b2b4053 |
files | configure src/ChangeLog src/doprnt.c src/extents.c src/lisp-disunion.h src/lisp-union.h src/lread.c src/mule-coding.c src/search.c src/text.h |
diffstat | 10 files changed, 48 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Tue May 07 16:14:04 2002 +0000 +++ b/configure Thu May 09 07:16:38 2002 +0000 @@ -15749,7 +15749,7 @@ test "$debug" = yes && echo " Compiling in support for extra debugging code." test "$usage_tracking" = yes && echo " Compiling in support for active usage tracking (Sun internal)." if test "$error_check_extents $error_check_types $error_check_text $error_check_gc $error_check_malloc $error_check_glyphs $error_check_byte_code $error_check_display $error_check_structures" \ - != "no no no no no no"; then + != "no no no no no no no no no"; then echo " WARNING: ---------------------------------------------------------" echo " WARNING: Compiling in support for runtime error checking." echo " WARNING: XEmacs will run noticeably more slowly as a result."
--- a/src/ChangeLog Tue May 07 16:14:04 2002 +0000 +++ b/src/ChangeLog Thu May 09 07:16:38 2002 +0000 @@ -1,3 +1,27 @@ +2002-05-09 Ben Wing <ben@xemacs.org> + + * doprnt.c (emacs_doprnt_1): + Use make_int() not make_char() when error about bad charval, + or abort will occur. + + * extents.c (signal_extent_changed): + Loop over children, not ourself -- avoid infinite loop. + + * lisp-disunion.h: + * lisp-union.h: + Rename make_char() to make_char_1 for error-checking purposes. + + * lread.c (read_escape): + Syntax error if escape is outside of ISO-8859-1 range. + Remove hopelessly broken (and unworkable) FSF_KEYS code. + + * mule-coding.c (Fdecode_shift_jis_char): + * search.c (skip_chars): + Spacing changes. + + * text.h: + New make_char() -- verify that the char value is legal. + 2002-04-23 Jerry James <james@xemacs.org> * select.c (Fown_selection_internal): Document connection with
--- a/src/doprnt.c Tue May 07 16:14:04 2002 +0000 +++ b/src/doprnt.c Thu May 09 07:16:38 2002 +0000 @@ -599,7 +599,7 @@ if (!valid_emchar_p (a)) syntax_error ("invalid character value %d to %%c spec", - make_char (a)); + make_int (a)); charlen = set_charptr_emchar (charbuf, a); doprnt_2 (stream, charbuf, charlen, spec->minwidth,
--- a/src/extents.c Tue May 07 16:14:04 2002 +0000 +++ b/src/extents.c Thu May 09 07:16:38 2002 +0000 @@ -1666,9 +1666,9 @@ /* first process all of the extent's children. We will lose big-time if there are any circularities here, so we sure as hell better ensure that there aren't. */ - LIST_LOOP_2 (rest, XWEAK_LIST_LIST (children)) - signal_extent_changed (extent, property, old_start, old_end, - descendants_too); + LIST_LOOP_2 (child, XWEAK_LIST_LIST (children)) + signal_extent_changed (XEXTENT (child), property, old_start, + old_end, descendants_too); } }
--- a/src/lisp-disunion.h Tue May 07 16:14:04 2002 +0000 +++ b/src/lisp-disunion.h Thu May 09 07:16:38 2002 +0000 @@ -101,7 +101,8 @@ #define make_int(x) ((Lisp_Object) (((x) << INT_GCBITS) | Lisp_Type_Int_Bit)) #define volatile_make_int(x) make_int (x) -#define make_char(x) ((Lisp_Object) (((x) << GCBITS) | Lisp_Type_Char)) + +#define make_char_1(x) ((Lisp_Object) (((x) << GCBITS) | Lisp_Type_Char)) #define INTP(x) ((EMACS_UINT)(x) & Lisp_Type_Int_Bit) #define INT_PLUS(x,y) ((x)+(y)-Lisp_Type_Int_Bit)
--- a/src/lisp-union.h Tue May 07 16:14:04 2002 +0000 +++ b/src/lisp-union.h Thu May 09 07:16:38 2002 +0000 @@ -138,10 +138,9 @@ #endif /* __cplusplus */ - DECLARE_INLINE_HEADER ( Lisp_Object -make_char (Emchar val) +make_char_1 (Emchar val) ) { Lisp_Object obj;
--- a/src/lread.c Tue May 07 16:14:04 2002 +0000 +++ b/src/lread.c Thu May 09 07:16:38 2002 +0000 @@ -1673,41 +1673,9 @@ For these reasons, FSF_KEYS hack is useless and without hope of ever working under XEmacs 20. */ -#undef FSF_KEYS - #ifdef FSF_KEYS -#define alt_modifier (0x040000) -#define super_modifier (0x080000) -#define hyper_modifier (0x100000) -#define shift_modifier (0x200000) -/* fsf uses a different modifiers for meta and control. Possibly - byte_compiled code will still work fsfmacs, though... --Stig - - #define ctl_modifier (0x400000) - #define meta_modifier (0x800000) -*/ -#define FSF_LOSSAGE(mask) \ - if (fail_on_bucky_bit_character_escapes || \ - ((c = readchar (readcharfun)) != '-')) \ - syntax_error ("Invalid escape character syntax", Qunbound); \ - c = readchar (readcharfun); \ - if (c < 0) \ - signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); \ - if (c == '\\') \ - c = read_escape (readcharfun); \ - return c | mask - - case 'S': FSF_LOSSAGE (shift_modifier); - case 'H': FSF_LOSSAGE (hyper_modifier); - case 'A': FSF_LOSSAGE (alt_modifier); - case 's': FSF_LOSSAGE (super_modifier); -#undef alt_modifier -#undef super_modifier -#undef hyper_modifier -#undef shift_modifier -#undef FSF_LOSSAGE - -#endif /* FSF_KEYS */ + /* Deleted */ +#endif case 'C': c = readchar (readcharfun); @@ -1750,6 +1718,9 @@ break; } } + if (i >= 0400) + syntax_error ("Attempt to create non-ASCII/ISO-8859-1 character", + make_int (i)); return i; }
--- a/src/mule-coding.c Tue May 07 16:14:04 2002 +0000 +++ b/src/mule-coding.c Thu May 09 07:16:38 2002 +0000 @@ -207,7 +207,7 @@ { DECODE_SHIFT_JIS (s1, s2, c1, c2); return make_char (make_emchar (Vcharset_japanese_jisx0208, - c1 & 0x7F, c2 & 0x7F)); + c1 & 0x7F, c2 & 0x7F)); } else return Qnil;
--- a/src/search.c Tue May 07 16:14:04 2002 +0000 +++ b/src/search.c Thu May 09 07:16:38 2002 +0000 @@ -884,8 +884,7 @@ if (c < 0400 && syntax_spec_code[c] < (unsigned char) Smax) fastmap[c] = 1; else - invalid_argument ("Invalid syntax designator", - make_char (c)); + invalid_argument ("Invalid syntax designator", make_char (c)); } else {
--- a/src/text.h Tue May 07 16:14:04 2002 +0000 +++ b/src/text.h Thu May 09 07:16:38 2002 +0000 @@ -1003,6 +1003,15 @@ #endif /* not MULE */ +DECLARE_INLINE_HEADER ( +Lisp_Object +make_char (Emchar val) +) +{ + type_checking_assert (valid_emchar_p (val)); + return make_char_1 (val); +} + #define CHAR_INTP(x) (INTP (x) && valid_emchar_p (XINT (x))) #define CHAR_OR_CHAR_INTP(x) (CHARP (x) || CHAR_INTP (x))