User: aidan
Date: 06/08/05 10:30:40
Modified: xemacs/src ChangeLog syntax.c
Log:
Eliminate some Windows build errors that also happen with gcc -pedantic.
Revision Changes Path
1.994 +6 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.993
retrieving revision 1.994
diff -u -p -r1.993 -r1.994
--- ChangeLog 2006/08/04 22:55:12 1.993
+++ ChangeLog 2006/08/05 08:30:35 1.994
@@ -1,5 +1,11 @@
2006-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
+ * syntax.c (complex_vars_of_syntax):
+ String literals are char[], not unsigned char[]. Cast them when
+ passing to a function that takes UExtbyte *.
+
+2006-08-05 Aidan Kehoe <kehoea(a)parhasard.net>
+
* lread.c (read_unicode_escape):
Refactor this code out from read_escape, since it's now called
from read_string as well.
1.30 +11 -9 XEmacs/xemacs/src/syntax.c
Index: syntax.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/syntax.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- syntax.c 2006/08/04 20:01:14 1.29
+++ syntax.c 2006/08/05 08:30:36 1.30
@@ -2490,18 +2490,20 @@ complex_vars_of_syntax (void)
/* Control 0; treat as punctuation */
SET_RANGE_SYNTAX(0, 32, Spunct);
- /* The whitespace--overwriting some of the above changes. */
- define_standard_syntax(" \t\015\014", Swhitespace);
+ /* The whitespace--overwriting some of the above changes.
+ String literals are const char *s, not const unsigned char *s. */
+ define_standard_syntax((const UExtbyte *)" \t\015\014", Swhitespace);
+
/* DEL plus Control 1 */
SET_RANGE_SYNTAX(127, 159, Spunct);
- define_standard_syntax ("\"", Sstring);
- define_standard_syntax ("\\", Sescape);
- define_standard_syntax ("_-+*/&|<>=", Ssymbol);
- define_standard_syntax (".,;:?!#@~^'`", Spunct);
+ define_standard_syntax ((const UExtbyte *)"\"", Sstring);
+ define_standard_syntax ((const UExtbyte *)"\\", Sescape);
+ define_standard_syntax ((const UExtbyte *)"_-+*/&|<>=", Ssymbol);
+ define_standard_syntax ((const UExtbyte *)".,;:?!#@~^'`", Spunct);
- for (p = "()[]{}"; *p; p+=2)
+ for (p = (const UExtbyte *)"()[]{}"; *p; p+=2)
{
Fput_char_table (make_char (p[0]),
Fcons (make_int (Sopen), make_char (p[1])),
@@ -2517,11 +2519,11 @@ complex_vars_of_syntax (void)
/* The guillemets. These are not parentheses, in contrast to what the old
code did. */
- define_standard_syntax("\253\273", Sstring);
+ define_standard_syntax((const UExtbyte *)"\253\273", Sstring);
/* The inverted exclamation mark, and the multiplication and division
signs. */
- define_standard_syntax("\241\327\367", Spunct);
+ define_standard_syntax((const UExtbyte *)"\241\327\367", Spunct);
#undef SET_RANGE_SYNTAX
}
Show replies by date