comparison src/file-coding.h @ 5140:e5380fdaf8f1

merge
author Ben Wing <ben@xemacs.org>
date Sat, 13 Mar 2010 05:38:34 -0600
parents a9c41067dd88
children 308d34e9f07d
comparison
equal deleted inserted replaced
5139:a48ef26d87ee 5140:e5380fdaf8f1
186 EOL_AUTODETECT 186 EOL_AUTODETECT
187 }; 187 };
188 188
189 struct Lisp_Coding_System 189 struct Lisp_Coding_System
190 { 190 {
191 struct LCRECORD_HEADER header; 191 NORMAL_LISP_OBJECT_HEADER header;
192 struct coding_system_methods *methods; 192 struct coding_system_methods *methods;
193 193
194 #define CODING_SYSTEM_SLOT_DECLARATION 194 #define CODING_SYSTEM_SLOT_DECLARATION
195 #define MARKED_SLOT(x) Lisp_Object x; 195 #define MARKED_SLOT(x) Lisp_Object x;
196 #include "coding-system-slots.h" 196 #include "coding-system-slots.h"
206 /* type-specific extra data attached to a coding_system */ 206 /* type-specific extra data attached to a coding_system */
207 char data[1]; 207 char data[1];
208 }; 208 };
209 typedef struct Lisp_Coding_System Lisp_Coding_System; 209 typedef struct Lisp_Coding_System Lisp_Coding_System;
210 210
211 DECLARE_LRECORD (coding_system, Lisp_Coding_System); 211 DECLARE_LISP_OBJECT (coding_system, Lisp_Coding_System);
212 #define XCODING_SYSTEM(x) XRECORD (x, coding_system, Lisp_Coding_System) 212 #define XCODING_SYSTEM(x) XRECORD (x, coding_system, Lisp_Coding_System)
213 #define wrap_coding_system(p) wrap_record (p, coding_system) 213 #define wrap_coding_system(p) wrap_record (p, coding_system)
214 #define CODING_SYSTEMP(x) RECORDP (x, coding_system) 214 #define CODING_SYSTEMP(x) RECORDP (x, coding_system)
215 #define CHECK_CODING_SYSTEM(x) CHECK_RECORD (x, coding_system) 215 #define CHECK_CODING_SYSTEM(x) CHECK_RECORD (x, coding_system)
216 #define CONCHECK_CODING_SYSTEM(x) CONCHECK_RECORD (x, coding_system) 216 #define CONCHECK_CODING_SYSTEM(x) CONCHECK_RECORD (x, coding_system)
361 garbage-collected. Most streams are deleted after they've been used, 361 garbage-collected. Most streams are deleted after they've been used,
362 so it's less likely (but still possible) that allocated data will 362 so it's less likely (but still possible) that allocated data will
363 stick around until GC time. (File handles can also be closed when EOF 363 stick around until GC time. (File handles can also be closed when EOF
364 is signalled; but some data must stick around after this point, for 364 is signalled; but some data must stick around after this point, for
365 the benefit of canonicalize_after_coding. See the convert method.) 365 the benefit of canonicalize_after_coding. See the convert method.)
366 Called only once (NOT called at disksave time). Optional. */ 366 Called only once. Optional. */
367 void (*finalize_coding_stream_method) (struct coding_stream *str); 367 void (*finalize_coding_stream_method) (struct coding_stream *str);
368 368
369 /* Finalize method: Clean up type-specific data (e.g. free allocated 369 /* Finalize method: Clean up type-specific data (e.g. free allocated
370 data) attached to the coding system (i.e. in struct 370 data) attached to the coding system (i.e. in struct
371 TYPE_coding_system), when the coding system is about to be garbage 371 TYPE_coding_system), when the coding system is about to be garbage
372 collected. (Currently not called.) Called only once (NOT called at 372 collected. (Currently not called.) Called only once. Optional. */
373 disksave time). Optional. */
374 void (*finalize_method) (Lisp_Object codesys); 373 void (*finalize_method) (Lisp_Object codesys);
375 374
376 /* Conversion end type method: Does this coding system encode bytes -> 375 /* Conversion end type method: Does this coding system encode bytes ->
377 characters, characters -> characters, bytes -> bytes, or 376 characters, characters -> characters, bytes -> bytes, or
378 characters -> bytes?. Default is characters -> bytes. Optional. */ 377 characters -> bytes?. Default is characters -> bytes. Optional. */
805 Bytecount data_size; 804 Bytecount data_size;
806 /* Detect method: Required. */ 805 /* Detect method: Required. */
807 void (*detect_method) (struct detection_state *st, 806 void (*detect_method) (struct detection_state *st,
808 const unsigned char *src, Bytecount n); 807 const unsigned char *src, Bytecount n);
809 /* Finalize detection state method: Clean up any allocated data in the 808 /* Finalize detection state method: Clean up any allocated data in the
810 detection state. Called only once (NOT called at disksave time). 809 detection state. Called only once. Optional. */
811 Optional. */
812 void (*finalize_detection_state_method) (struct detection_state *st); 810 void (*finalize_detection_state_method) (struct detection_state *st);
813 }; 811 };
814 812
815 /* Lvalue for a particular detection result -- detection state ST, 813 /* Lvalue for a particular detection result -- detection state ST,
816 category CAT */ 814 category CAT */