300 |
if (c1 >= 0) |
if (c1 >= 0) |
301 |
{ |
{ |
302 |
CHAR_TABLE_SET (table, from_c, make_number (c1)); |
CHAR_TABLE_SET (table, from_c, make_number (c1)); |
303 |
CHAR_TABLE_SET (Vchar_unify_table, c1, from_c); |
CHAR_TABLE_SET (Vchar_unify_table, c1, make_number (from_c)); |
304 |
if (CHAR_TABLE_P (Vchar_unified_charset_table)) |
if (CHAR_TABLE_P (Vchar_unified_charset_table)) |
305 |
CHAR_TABLE_SET (Vchar_unified_charset_table, c1, |
CHAR_TABLE_SET (Vchar_unified_charset_table, c1, |
306 |
CHARSET_NAME (charset)); |
CHARSET_NAME (charset)); |
661 |
Lisp_Object function, charset, arg, from_code, to_code; |
Lisp_Object function, charset, arg, from_code, to_code; |
662 |
{ |
{ |
663 |
struct charset *cs; |
struct charset *cs; |
664 |
|
unsigned from, to; |
665 |
|
|
666 |
CHECK_CHARSET_GET_CHARSET (charset, cs); |
CHECK_CHARSET_GET_CHARSET (charset, cs); |
667 |
if (NILP (from_code)) |
if (NILP (from_code)) |
668 |
from_code = 0; |
from_code = make_number (0); |
669 |
if (from_code < CHARSET_MIN_CODE (cs)) |
CHECK_NATNUM (from_code); |
670 |
from_code = CHARSET_MIN_CODE (cs); |
from = XINT (from_code); |
671 |
|
if (from < CHARSET_MIN_CODE (cs)) |
672 |
|
from = CHARSET_MIN_CODE (cs); |
673 |
if (NILP (to_code)) |
if (NILP (to_code)) |
674 |
to_code = 0xFFFFFFFF; |
to_code = make_number (0xFFFFFFFF); |
675 |
if (to_code > CHARSET_MAX_CODE (cs)) |
CHECK_NATNUM (from_code); |
676 |
to_code = CHARSET_MAX_CODE (cs); |
to = XINT (to_code); |
677 |
|
if (to > CHARSET_MAX_CODE (cs)) |
678 |
|
to_code = make_number (CHARSET_MAX_CODE (cs)); |
679 |
|
|
680 |
map_charset_chars (NULL, function, arg, cs, from_code, to_code); |
map_charset_chars (NULL, function, arg, cs, from, to); |
681 |
return Qnil; |
return Qnil; |
682 |
} |
} |
683 |
|
|
1213 |
CHECK_CHARSET_GET_ID (charset, id); |
CHECK_CHARSET_GET_ID (charset, id); |
1214 |
check_iso_charset_parameter (dimension, chars, final_char); |
check_iso_charset_parameter (dimension, chars, final_char); |
1215 |
|
|
1216 |
ISO_CHARSET_TABLE (dimension, chars, final_char) = id; |
ISO_CHARSET_TABLE (XINT (dimension), XINT (chars), XINT (final_char)) = id; |
1217 |
return Qnil; |
return Qnil; |
1218 |
} |
} |
1219 |
|
|
1613 |
(ch, charset, restriction) |
(ch, charset, restriction) |
1614 |
Lisp_Object ch, charset, restriction; |
Lisp_Object ch, charset, restriction; |
1615 |
{ |
{ |
1616 |
int c, id; |
int id; |
1617 |
unsigned code; |
unsigned code; |
1618 |
struct charset *charsetp; |
struct charset *charsetp; |
1619 |
|
|
1620 |
CHECK_CHARSET_GET_ID (charset, id); |
CHECK_CHARSET_GET_ID (charset, id); |
1621 |
CHECK_NATNUM (ch); |
CHECK_NATNUM (ch); |
|
c = XINT (ch); |
|
1622 |
charsetp = CHARSET_FROM_ID (id); |
charsetp = CHARSET_FROM_ID (id); |
1623 |
code = ENCODE_CHAR (charsetp, ch); |
code = ENCODE_CHAR (charsetp, XINT (ch)); |
1624 |
if (code == CHARSET_INVALID_CODE (charsetp)) |
if (code == CHARSET_INVALID_CODE (charsetp)) |
1625 |
return Qnil; |
return Qnil; |
1626 |
if (code > 0x7FFFFFF) |
if (code > 0x7FFFFFF) |
1743 |
/* Fixme: `unknown' can't happen now? */ |
/* Fixme: `unknown' can't happen now? */ |
1744 |
DEFUN ("split-char", Fsplit_char, Ssplit_char, 1, 1, 0, |
DEFUN ("split-char", Fsplit_char, Ssplit_char, 1, 1, 0, |
1745 |
doc: /*Return list of charset and one to three position-codes of CHAR. |
doc: /*Return list of charset and one to three position-codes of CHAR. |
1746 |
If CHAR is invalid as a character code, |
If CHAR is invalid as a character code, return a list `(unknown CHAR)'. */) |
|
return a list of symbol `unknown' and CHAR. */) |
|
1747 |
(ch) |
(ch) |
1748 |
Lisp_Object ch; |
Lisp_Object ch; |
1749 |
{ |
{ |
1871 |
Lisp_Object val = Qnil, list = Vcharset_ordered_list; |
Lisp_Object val = Qnil, list = Vcharset_ordered_list; |
1872 |
|
|
1873 |
if (!NILP (highestp)) |
if (!NILP (highestp)) |
1874 |
return CHARSET_NAME (CHARSET_FROM_ID (Fcar (list))); |
return CHARSET_NAME (CHARSET_FROM_ID (XINT (Fcar (list)))); |
1875 |
|
|
1876 |
while (!NILP (list)) |
while (!NILP (list)) |
1877 |
{ |
{ |
1878 |
val = Fcons (CHARSET_NAME (CHARSET_FROM_ID (XCAR (list))), val); |
val = Fcons (CHARSET_NAME (CHARSET_FROM_ID (XINT (XCAR (list)))), val); |
1879 |
list = XCDR (list); |
list = XCDR (list); |
1880 |
} |
} |
1881 |
return Fnreverse (val); |
return Fnreverse (val); |
1889 |
int nargs; |
int nargs; |
1890 |
Lisp_Object *args; |
Lisp_Object *args; |
1891 |
{ |
{ |
1892 |
Lisp_Object new_head = Qnil, old_list, id, arglist[2]; |
Lisp_Object new_head = Qnil, old_list, arglist[2]; |
1893 |
int i; |
int i, id; |
1894 |
|
|
1895 |
old_list = Fcopy_sequence (Vcharset_ordered_list); |
old_list = Fcopy_sequence (Vcharset_ordered_list); |
1896 |
for (i = 0; i < nargs; i++) |
for (i = 0; i < nargs; i++) |
1897 |
{ |
{ |
1898 |
CHECK_CHARSET_GET_ID (args[i], id); |
CHECK_CHARSET_GET_ID (args[i], id); |
1899 |
old_list = Fdelq (id, old_list); |
old_list = Fdelq (make_number (id), old_list); |
1900 |
new_head = Fcons (id, new_head); |
new_head = Fcons (make_number (id), new_head); |
1901 |
} |
} |
1902 |
arglist[0] = Fnreverse (new_head); |
arglist[0] = Fnreverse (new_head); |
1903 |
arglist[1] = old_list; |
arglist[1] = old_list; |
2062 |
plist[13] = args[charset_arg_code_offset]; |
plist[13] = args[charset_arg_code_offset]; |
2063 |
args[charset_arg_plist] = Flist (14, plist); |
args[charset_arg_plist] = Flist (14, plist); |
2064 |
Fdefine_charset_internal (charset_arg_max, args); |
Fdefine_charset_internal (charset_arg_max, args); |
2065 |
charset_ascii = CHARSET_SYMBOL_ID (Qascii); |
charset_ascii = XINT (CHARSET_SYMBOL_ID (Qascii)); |
2066 |
|
|
2067 |
args[charset_arg_name] = Qunicode; |
args[charset_arg_name] = Qunicode; |
2068 |
args[charset_arg_dimension] = make_number (3); |
args[charset_arg_dimension] = make_number (3); |
2094 |
plist[13] = args[charset_arg_code_offset]; |
plist[13] = args[charset_arg_code_offset]; |
2095 |
args[charset_arg_plist] = Flist (14, plist); |
args[charset_arg_plist] = Flist (14, plist); |
2096 |
Fdefine_charset_internal (charset_arg_max, args); |
Fdefine_charset_internal (charset_arg_max, args); |
2097 |
charset_unicode = CHARSET_SYMBOL_ID (Qunicode); |
charset_unicode = XINT (CHARSET_SYMBOL_ID (Qunicode)); |
2098 |
} |
} |
2099 |
} |
} |
2100 |
|
|