summaryrefslogtreecommitdiff
path: root/libguile/ports.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-05-13 10:31:01 +0200
committerAndy Wingo <wingo@pobox.com>2016-05-13 10:33:17 +0200
commit8af64975be43a5055e6a74e9eef89a9c9955af7d (patch)
tree40ac5c21463323cf35d823b3bd2c3faa6ede5e51 /libguile/ports.h
parent209d50c7d8c1f8e5e365eb7d88d53c297d71621e (diff)
downloadguile-8af64975be43a5055e6a74e9eef89a9c9955af7d.tar.gz
Make file/line/column fields of ports private
* libguile/ports-internal.h (scm_t_port_internal): Move file_name, line_number, and column_number here. (SCM_FILENAME, SCM_SET_FILENAME, SCM_LINUM, SCM_COL, SCM_INCLINE): (SCM_ZEROCOL, SCM_INCCOL, SCM_DECCOL, SCM_TABCOL): Make internal. * libguile/ports.c (scm_c_make_port_with_encoding) (scm_set_port_line_x, scm_set_port_column_x): Adapt to change.
Diffstat (limited to 'libguile/ports.h')
-rw-r--r--libguile/ports.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/libguile/ports.h b/libguile/ports.h
index 793523b71..efaa7654f 100644
--- a/libguile/ports.h
+++ b/libguile/ports.h
@@ -84,11 +84,6 @@ typedef struct
/* Data for the underlying port implementation as a raw C value. */
scm_t_bits stream;
- /* Source location information. */
- SCM file_name;
- long line_number;
- int column_number;
-
/* Port buffers. */
SCM read_buf;
SCM write_buf;
@@ -147,17 +142,6 @@ SCM_INTERNAL SCM scm_i_port_weak_set;
#define SCM_SETPTAB_ENTRY(x, ent) (SCM_SET_CELL_WORD_1 ((x), (scm_t_bits) (ent)))
#define SCM_STREAM(x) (SCM_PTAB_ENTRY(x)->stream)
#define SCM_SETSTREAM(x, s) (SCM_PTAB_ENTRY(x)->stream = (scm_t_bits) (s))
-#define SCM_FILENAME(x) (SCM_PTAB_ENTRY(x)->file_name)
-#define SCM_SET_FILENAME(x, n) (SCM_PTAB_ENTRY(x)->file_name = (n))
-#define SCM_LINUM(x) (SCM_PTAB_ENTRY(x)->line_number)
-#define SCM_COL(x) (SCM_PTAB_ENTRY(x)->column_number)
-
-#define SCM_INCLINE(port) do {SCM_LINUM (port) += 1; SCM_COL (port) = 0;} while (0)
-#define SCM_ZEROCOL(port) do {SCM_COL (port) = 0;} while (0)
-#define SCM_INCCOL(port) do {SCM_COL (port) += 1;} while (0)
-#define SCM_DECCOL(port) do {if (SCM_COL (port) > 0) SCM_COL (port) -= 1;} while (0)
-#define SCM_TABCOL(port) do {SCM_COL (port) += 8 - SCM_COL (port) % 8;} while (0)
-
/* Maximum number of port types. */
#define SCM_I_MAX_PORT_TYPE_COUNT 256