From: tomo Date: Mon, 11 Oct 1999 18:49:13 +0000 (+0000) Subject: (next_allocated_leading_byte): New variable in UTF-2000. X-Git-Tag: r21-2-19-utf-2000-0_9-0~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4e459a51d8a3d67619d5ea806f08c25d4893e987;p=chise%2Fxemacs-chise.git.1 (next_allocated_leading_byte): New variable in UTF-2000. (next_allocated_1_byte_leading_byte): Don't define in UTF-2000. (next_allocated_2_byte_leading_byte): Don't define in UTF-2000. (get_unallocated_leading_byte): Simply use `next_allocated_leading_byte' [ignore dimension] in UTF-2000. (vars_of_mule_charset): Setup `next_allocated_leading_byte' in UTF-2000. --- diff --git a/src/mule-charset.c b/src/mule-charset.c index 1adb018..850817e 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -363,8 +363,12 @@ Lisp_Object Ql2r, Qr2l; Lisp_Object Vcharset_hash_table; +#ifdef UTF2000 +static Charset_ID next_allocated_leading_byte; +#else static Charset_ID next_allocated_1_byte_leading_byte; static Charset_ID next_allocated_2_byte_leading_byte; +#endif /* Composite characters are characters constructed by overstriking two or more regular characters. @@ -903,6 +907,12 @@ get_unallocated_leading_byte (int dimension) { Charset_ID lb; +#ifdef UTF2000 + if (next_allocated_leading_byte > MAX_LEADING_BYTE_PRIVATE) + lb = 0; + else + lb = next_allocated_leading_byte++; +#else if (dimension == 1) { if (next_allocated_1_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_1) @@ -917,6 +927,7 @@ get_unallocated_leading_byte (int dimension) else lb = next_allocated_2_byte_leading_byte++; } +#endif if (!lb) signal_simple_error @@ -2051,10 +2062,10 @@ vars_of_mule_charset (void) charset_by_attributes[i][j][k] = Qnil; #endif - next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1; #ifdef UTF2000 - next_allocated_2_byte_leading_byte = LEADING_BYTE_CHINESE_BIG5_2 + 1; + next_allocated_leading_byte = MIN_LEADING_BYTE_PRIVATE; #else + next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1; next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2; #endif