/* Authorship:
Ben Wing: wrote, for 19.13 (Mule). Some category table stuff
- loosely based on the original Mule.
+ loosely based on the original Mule.
Jareth Hein: fixed a couple of bugs in the implementation, and
- added regex support for categories with check_category_at
+ added regex support for categories with check_category_at
*/
#include <config.h>
switch (type) {
default:
abort();
+ return Qnil;
case CHAR_TABLE_TYPE_GENERIC:
return Qgeneric;
case CHAR_TABLE_TYPE_SYNTAX:
Lisp_Object jen = cte->level2[i - 32];
if (!CHAR_TABLE_ENTRYP(jen)) {
- char buf[100];
-
write_c_string(" [", printcharfun);
print_internal(XCHARSET_NAME(charset), printcharfun, 0);
- sprintf(buf, " %d] ", i);
- write_c_string(buf, printcharfun);
+ write_fmt_str(printcharfun, " %d] ", i);
print_internal(jen, printcharfun, 0);
} else
print_chartab_charset_row(charset, i,
print_char_table(Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
Lisp_Char_Table *ct = XCHAR_TABLE(obj);
- char buf[200];
Lisp_Object tmp_sym = char_table_type_to_symbol(ct->type);
- snprintf(buf, countof(buf)-1, "#s(char-table type %s data (",
- string_data(symbol_name(XSYMBOL(tmp_sym))));
- write_c_string(buf, printcharfun);
+ write_fmt_string(printcharfun, "#s(char-table type %s data (",
+ string_data(symbol_name(XSYMBOL(tmp_sym))));
/* Now write out the ASCII/Control-1 stuff. */
{
break;
case CHAR_TABLE_TYPE_GENERIC:
+#ifdef MULE
case CHAR_TABLE_TYPE_CATEGORY:
+#endif
case CHAR_TABLE_TYPE_DISPLAY:
default:
break;
/* Return 1 if CATEGORY_SET contains CATEGORY, else return 0.
The faster version of `!NILP (Faref (category_set, category))'. */
-#define CATEGORY_MEMBER(category, category_set) \
+#define CATEGORY_MEMBER(category, category_set) \
(bit_vector_bit(XBIT_VECTOR (category_set), category - 32))
/* Return 1 if there is a word boundary between two word-constituent