User: aidan
Date: 06/06/14 08:10:12
Modified: xemacs/src ChangeLog mule-ccl.c unicode.c
Log:
Fix snprintf problems with the Win32 build.
Revision Changes Path
1.972 +9 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.971
retrieving revision 1.972
diff -u -p -r1.971 -r1.972
--- ChangeLog 2006/06/03 17:50:51 1.971
+++ ChangeLog 2006/06/14 06:10:08 1.972
@@ -1,3 +1,12 @@
+2006-06-14 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * mule-ccl.c:
+ Don't declare ccl-program as a symbol here, leave that to
+ general-slots.h.
+ * unicode.c (unicode_to_ichar):
+ Use qxesprintf, not snprintf, change some types to allow
+ complilation on Win32.
+
2006-06-03 Aidan Kehoe <kehoea(a)parhasard.net>
* charset.h:
1.30 +3 -2 XEmacs/xemacs/src/mule-ccl.c
Index: mule-ccl.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-ccl.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- mule-ccl.c 2006/06/03 17:50:54 1.29
+++ mule-ccl.c 2006/06/14 06:10:10 1.30
@@ -39,8 +39,9 @@ Lisp_Object Vcode_conversion_map_vector;
Lisp_Object Vfont_ccl_encoder_alist;
/* This symbol is a property which associates with ccl program vector.
- Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */
-Lisp_Object Qccl_program;
+ Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector.
+ Moved to general-slots.h. */
+/* Lisp_Object Qccl_program; */
/* These symbols are properties which associate with code conversion
map and their ID respectively. */
1.34 +8 -4 XEmacs/xemacs/src/unicode.c
Index: unicode.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/unicode.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -r1.33 -r1.34
--- unicode.c 2006/06/03 17:50:55 1.33
+++ unicode.c 2006/06/14 06:10:10 1.34
@@ -1112,7 +1112,7 @@ unicode_to_ichar (int code, Lisp_Object_
if (NILP (Vcurrent_jit_charset) ||
(-1 == (i = get_free_codepoint(Vcurrent_jit_charset))))
{
- Ascbyte setname[32];
+ Ibyte setname[32];
Lisp_Object charset_descr = build_string
("Mule charset for otherwise unknown Unicode code points.");
Lisp_Object charset_regr = build_string("iso10646-1");
@@ -1125,9 +1125,13 @@ unicode_to_ichar (int code, Lisp_Object_
last_jit_charset_final = 0x30;
}
- snprintf(setname, sizeof(setname),
- "jit-ucs-charset-%d", number_of_jit_charsets++);
+ /* Assertion added partly because our Win32 layer doesn't
+ support snprintf; with this, we're sure it won't overflow
+ the buffer. */
+ assert(100 > number_of_jit_charsets);
+ qxesprintf(setname, "jit-ucs-charset-%d", number_of_jit_charsets++);
+
/* Aside: GCPROing here would be overkill according to the FSF's
philosophy. make-charset cannot currently GC, but is intended
to be called from Lisp, with its arguments protected by the
@@ -1136,7 +1140,7 @@ unicode_to_ichar (int code, Lisp_Object_
GCPRO2 (charset_descr, charset_regr);
Vcurrent_jit_charset = Fmake_charset
- (intern(setname), charset_descr,
+ (intern((const CIbyte *)setname), charset_descr,
/* Set encode-as-utf-8 to t, to have this character set written
using UTF-8 escapes in escape-quoted and ctext. This
sidesteps the fact that our internal character -> Unicode