X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fmule-charset.c;h=285fa6990057a4e20524d4061ac06d707881d63d;hp=069bdd89d9c9eee8261d028c06c761ae7102dffa;hb=716cfba952c1dc0d2cf5c968971f3780ba728a89;hpb=d74da9234cc42e8018b1500105c3892a5c46d5e3 diff --git a/src/mule-charset.c b/src/mule-charset.c index 069bdd8..285fa69 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -77,12 +77,12 @@ static int composite_char_col_next; struct charset_lookup *chlook; static const struct lrecord_description charset_lookup_description_1[] = { - { XD_LISP_OBJECT, offsetof(struct charset_lookup, charset_by_leading_byte), 128+4*128*2 }, + { XD_LISP_OBJECT_ARRAY, offsetof (struct charset_lookup, charset_by_leading_byte), 128+4*128*2 }, { XD_END } }; static const struct struct_description charset_lookup_description = { - sizeof(struct charset_lookup), + sizeof (struct charset_lookup), charset_lookup_description_1 }; @@ -409,7 +409,7 @@ Lstream_funget_emchar (Lstream *stream, Emchar ch) static Lisp_Object mark_charset (Lisp_Object obj) { - struct Lisp_Charset *cs = XCHARSET (obj); + Lisp_Charset *cs = XCHARSET (obj); mark_object (cs->short_name); mark_object (cs->long_name); @@ -422,7 +422,7 @@ mark_charset (Lisp_Object obj) static void print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) { - struct Lisp_Charset *cs = XCHARSET (obj); + Lisp_Charset *cs = XCHARSET (obj); char buf[200]; if (print_readably) @@ -454,13 +454,19 @@ print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) } static const struct lrecord_description charset_description[] = { - { XD_LISP_OBJECT, offsetof(struct Lisp_Charset, name), 7 }, + { XD_LISP_OBJECT, offsetof (Lisp_Charset, name) }, + { XD_LISP_OBJECT, offsetof (Lisp_Charset, doc_string) }, + { XD_LISP_OBJECT, offsetof (Lisp_Charset, registry) }, + { XD_LISP_OBJECT, offsetof (Lisp_Charset, short_name) }, + { XD_LISP_OBJECT, offsetof (Lisp_Charset, long_name) }, + { XD_LISP_OBJECT, offsetof (Lisp_Charset, reverse_direction_charset) }, + { XD_LISP_OBJECT, offsetof (Lisp_Charset, ccl_program) }, { XD_END } }; DEFINE_LRECORD_IMPLEMENTATION ("charset", charset, mark_charset, print_charset, 0, 0, 0, charset_description, - struct Lisp_Charset); + Lisp_Charset); /* Make a new charset. */ static Lisp_Object @@ -471,8 +477,10 @@ make_charset (int id, Lisp_Object name, unsigned char rep_bytes, Lisp_Object reg) { Lisp_Object obj; - struct Lisp_Charset *cs = - alloc_lcrecord_type (struct Lisp_Charset, &lrecord_charset); + Lisp_Charset *cs = alloc_lcrecord_type (Lisp_Charset, &lrecord_charset); + + zero_lcrecord (cs); + XSETCHARSET (obj, cs); CHARSET_ID (cs) = id; @@ -828,7 +836,7 @@ NEW-NAME is the name of the new charset. Return the new charset. int id, dimension, columns, graphic, final; int direction, type; Lisp_Object registry, doc_string, short_name, long_name; - struct Lisp_Charset *cs; + Lisp_Charset *cs; charset = Fget_charset (charset); if (!NILP (XCHARSET_REVERSE_DIRECTION_CHARSET (charset))) @@ -977,7 +985,7 @@ Recognized properties are those listed in `make-charset', as well as */ (charset, prop)) { - struct Lisp_Charset *cs; + Lisp_Charset *cs; charset = Fget_charset (charset); cs = XCHARSET (charset); @@ -1071,7 +1079,7 @@ character s with caron. */ (charset, arg1, arg2)) { - struct Lisp_Charset *cs; + Lisp_Charset *cs; int a1, a2; int lowlim, highlim;