defconst, defvar: proclaim special at compile-time
[bpt/guile.git] / libguile / ports-internal.h
index 48dcaa7..bff89cb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ports-internal.h - internal-only declarations for ports.
  *
- * Copyright (C) 2013, 2014 Free Software Foundation, Inc.
+ * Copyright (C) 2013 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
 
 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 */
@@ -50,17 +50,7 @@ struct scm_port_internal
   unsigned at_stream_start_for_bom_write : 1;
   scm_t_port_encoding_mode encoding_mode;
   scm_t_iconv_descriptors *iconv_descriptors;
-  unsigned char pending_eof: 1;
-
-  /* When non-NULL, this is the method called by 'setvbuf' for this port.
-     It must create read and write buffers for PORT with the specified
-     sizes (a size of 0 is for unbuffered ports, which should use the
-     'shortbuf' field.)  Size -1 means to use the port's preferred buffer
-     size.  */
-  /* XXX: In 2.2 make this a property of the 'scm_t_ptob_descriptor'.  */
-  void (*setvbuf) (SCM port, long read_size, long write_size);
-
-  /* Key-value properties.  */
+  int pending_eof;
   SCM alist;
 };
 
@@ -68,8 +58,7 @@ typedef struct scm_port_internal scm_t_port_internal;
 
 #define SCM_UNICODE_BOM  0xFEFFUL  /* Unicode byte-order mark */
 
-#define SCM_PORT_GET_INTERNAL(x)                                \
-  ((scm_t_port_internal *) (SCM_PTAB_ENTRY(x)->input_cd))
+#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);