comparison src/file-coding.c @ 420:41dbb7a9d5f2 r21-2-18

Import from CVS: tag r21-2-18
author cvs
date Mon, 13 Aug 2007 11:24:09 +0200
parents e804706bfb8c
children 95016f13131a
comparison
equal deleted inserted replaced
419:66615b78f1a5 420:41dbb7a9d5f2
23 23
24 /* Rewritten by Ben Wing <ben@xemacs.org>. */ 24 /* Rewritten by Ben Wing <ben@xemacs.org>. */
25 25
26 #include <config.h> 26 #include <config.h>
27 #include "lisp.h" 27 #include "lisp.h"
28
28 #include "buffer.h" 29 #include "buffer.h"
29 #include "elhash.h" 30 #include "elhash.h"
30 #include "insdel.h" 31 #include "insdel.h"
31 #include "lstream.h" 32 #include "lstream.h"
32 #ifdef MULE 33 #ifdef MULE
242 243
243 static Lisp_Object mark_coding_system (Lisp_Object, void (*) (Lisp_Object)); 244 static Lisp_Object mark_coding_system (Lisp_Object, void (*) (Lisp_Object));
244 static void print_coding_system (Lisp_Object, Lisp_Object, int); 245 static void print_coding_system (Lisp_Object, Lisp_Object, int);
245 static void finalize_coding_system (void *header, int for_disksave); 246 static void finalize_coding_system (void *header, int for_disksave);
246 247
248 #ifdef MULE
249 static const struct lrecord_description ccs_description_1[] = {
250 { XD_LISP_OBJECT, offsetof(charset_conversion_spec, from_charset), 2 },
251 { XD_END }
252 };
253
254 static const struct struct_description ccs_description = {
255 sizeof(charset_conversion_spec),
256 ccs_description_1
257 };
258
259 static const struct lrecord_description ccsd_description_1[] = {
260 XD_DYNARR_DESC(charset_conversion_spec_dynarr, &ccs_description),
261 { XD_END }
262 };
263
264 static const struct struct_description ccsd_description = {
265 sizeof(charset_conversion_spec_dynarr),
266 ccsd_description_1
267 };
268 #endif
269
270 static const struct lrecord_description coding_system_description[] = {
271 { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, name), 2 },
272 { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, mnemonic), 3 },
273 { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, eol_lf), 3 },
274 #ifdef MULE
275 { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, iso2022.initial_charset), 4 },
276 { XD_STRUCT_PTR, offsetof(struct Lisp_Coding_System, iso2022.input_conv), 1, &ccsd_description },
277 { XD_STRUCT_PTR, offsetof(struct Lisp_Coding_System, iso2022.output_conv), 1, &ccsd_description },
278 { XD_LISP_OBJECT, offsetof(struct Lisp_Coding_System, ccl.decode), 2 },
279 #endif
280 { XD_END }
281 };
282
247 DEFINE_LRECORD_IMPLEMENTATION ("coding-system", coding_system, 283 DEFINE_LRECORD_IMPLEMENTATION ("coding-system", coding_system,
248 mark_coding_system, print_coding_system, 284 mark_coding_system, print_coding_system,
249 finalize_coding_system, 285 finalize_coding_system,
250 0, 0, struct Lisp_Coding_System); 286 0, 0, coding_system_description,
287 struct Lisp_Coding_System);
251 288
252 static Lisp_Object 289 static Lisp_Object
253 mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) 290 mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object))
254 { 291 {
255 Lisp_Coding_System *codesys = XCODING_SYSTEM (obj); 292 Lisp_Coding_System *codesys = XCODING_SYSTEM (obj);