X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/45c0878b8665182f06a917e391169031c1dc7db6..e87f059319e40b582d5ee8fd815876550f1148b9:/libguile/ports-internal.h diff --git a/libguile/ports-internal.h b/libguile/ports-internal.h index 333d4fbc8..bff89cb5e 100644 --- a/libguile/ports-internal.h +++ b/libguile/ports-internal.h @@ -27,14 +27,14 @@ enum scm_port_encoding_mode { SCM_PORT_ENCODING_MODE_UTF8, + SCM_PORT_ENCODING_MODE_LATIN1, SCM_PORT_ENCODING_MODE_ICONV }; typedef enum scm_port_encoding_mode scm_t_port_encoding_mode; /* This is a separate object so that only those ports that use iconv - cause finalizers to be registered (FIXME: although currently in 2.0 - finalizers are always registered for ports anyway). */ + cause finalizers to be registered. */ struct scm_iconv_descriptors { /* input/output iconv conversion descriptors */ @@ -46,6 +46,8 @@ typedef struct scm_iconv_descriptors scm_t_iconv_descriptors; struct scm_port_internal { + unsigned at_stream_start_for_bom_read : 1; + unsigned at_stream_start_for_bom_write : 1; scm_t_port_encoding_mode encoding_mode; scm_t_iconv_descriptors *iconv_descriptors; int pending_eof; @@ -54,9 +56,11 @@ struct scm_port_internal typedef struct scm_port_internal scm_t_port_internal; -#define SCM_PORT_GET_INTERNAL(x) \ - ((scm_t_port_internal *) (SCM_PTAB_ENTRY(x)->input_cd)) +#define SCM_UNICODE_BOM 0xFEFFUL /* Unicode byte-order mark */ -SCM_INTERNAL scm_t_iconv_descriptors *scm_i_port_iconv_descriptors (SCM port); +#define SCM_PORT_GET_INTERNAL(x) (SCM_PTAB_ENTRY(x)->internal) + +SCM_INTERNAL scm_t_iconv_descriptors * +scm_i_port_iconv_descriptors (SCM port, scm_t_port_rw_active mode); #endif