summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/ChangeLog53
-rw-r--r--libguile/Makefile.am4
-rw-r--r--libguile/fports.h2
-rw-r--r--libguile/unif.c2
4 files changed, 56 insertions, 5 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 096c98933..bca97132b 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,3 +1,51 @@
+1999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
+
+ * ports.c, ports.h (scm_make_port_type): New interface for
+ creation of port types (replaces scm_newptob). Just as for the
+ smobs, we need to separate the internal representation of smob
+ types from the interface, so that we easily can add new fields and
+ rearrange things without caring about backward compatibility.
+ This change was forced by the need in GOOPS to create classes
+ representing port types.
+ (scm_set_ptob_mark, scm_set_ptob_free, scm_set_ptob_print,
+ scm_set_ptob_equalp, scm_set_ptob_flush_input, scm_set_ptob_close,
+ scm_set_ptob_seek, scm_set_ptob_truncate,
+ scm_set_ptob_input_waiting_p): New setters.
+ (scm_newptob): Rewritten to use scm_make_port_type. For backward
+ compatibility.
+ (scm_ptobs): Changed type scm_ptobfuns --> scm_ptob_descriptor.
+ (scm_prinport): Removed.
+ (scm_port_print): Added.
+ (scm_print_port_mode): Added.
+ (void_port_ptob, print_void_port, close_void_port, noop0):
+ Removed. Removed #include "genio.h" Added #include "objects.h",
+ #include "smobs.h"
+
+ * fports.c (prinfport): Moved code from ports.c.
+ (local_free): Added.
+ (scm_fptob): Removed. Instead use new interface.
+ (scm_make_fptob): Added. (Need to create basic ports in a
+ specific order in ports.c.)
+
+ * strports.c (scm_stptob, prinstpt, noop0): Removed
+ (scm_make_stptob): Added.
+
+ * vports.c (scm_sfport, prinsfpt, sf_read_flush, noop0): Removed.
+ (scm_make_sfport): Added.
+
+ * filesys.c (scm_dir_print): Don't use the port printing code.
+ Instead provide specific directory printer.
+
+ * gc.c (scm_gc_sweep): Use value returned from scm_ptobs[].free.
+
+ * ioext.c (scm_redirect_port): Replaced scm_ptobfuns -->
+ scm_ptob_descriptor.
+
+ * smob.c (scm_smob_print): Handle non-existing type name nicely.
+ Removed #include "genio.h"
+
+ * objects.c (scm_make_port_classes): New function ptr.
+
1999-07-24 Gary Houston <ghouston@easynet.co.uk>
* gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
@@ -17,6 +65,11 @@
(SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
SCM_INOUT_PCLASS_INDEX): Added.
+
+ * Makefile.am: Removed genio.c, genio.x.
+
+ * genio.c: Removed.
+
1999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
* init.c: Make sure that scm_post_boot_init_modules is called only
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 9121a1a16..a99a54ec5 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -38,7 +38,7 @@ libguile_la_SOURCES = \
alist.c arbiters.c async.c backtrace.c boolean.c chars.c \
continuations.c debug.c dynl.c dynwind.c eq.c error.c eval.c \
evalext.c feature.c filesys.c fluids.c fports.c gc.c gdbint.c \
- genio.c gh_data.c gh_eval.c gh_funcs.c gh_init.c gh_io.c gh_list.c \
+ gh_data.c gh_eval.c gh_funcs.c gh_init.c gh_io.c gh_list.c \
gh_predicates.c gsubr.c guardians.c hash.c hashtab.c init.c \
ioext.c keywords.c list.c load.c macros.c mallocs.c \
modules.c net_db.c numbers.c objects.c objprop.c options.c pairs.c \
@@ -52,7 +52,7 @@ BUILT_SOURCES = \
cpp_err_symbols.c cpp_sig_symbols.c libpath.h alist.x arbiters.x \
async.x backtrace.x boolean.x chars.x continuations.x debug.x \
dynl.x dynwind.x eq.x error.x eval.x evalext.x feature.x filesys.x \
- fluids.x fports.x gc.x gdbint.x genio.x gh_data.x gh_eval.x \
+ fluids.x fports.x gc.x gdbint.x gh_data.x gh_eval.x \
gh_funcs.x gh_init.x gh_io.x gh_list.x gh_predicates.x gsubr.x \
guardians.x hash.x hashtab.x init.x ioext.x iselect.x keywords.x \
list.x load.x macros.x mallocs.x modules.x net_db.x \
diff --git a/libguile/fports.h b/libguile/fports.h
index 29bbb6446..78619c7fd 100644
--- a/libguile/fports.h
+++ b/libguile/fports.h
@@ -66,8 +66,6 @@ struct scm_fport {
/* test whether fdes supports random access. */
#define SCM_FDES_RANDOM_P(fdes) ((lseek (fdes, 0, SEEK_CUR) == -1) ? 0 : 1)
-extern scm_ptobfuns scm_fptob;
-
extern SCM scm_setbuf0 (SCM port);
extern SCM scm_setvbuf (SCM port, SCM mode, SCM size);
diff --git a/libguile/unif.c b/libguile/unif.c
index 83206f860..beabdd1c3 100644
--- a/libguile/unif.c
+++ b/libguile/unif.c
@@ -1695,7 +1695,7 @@ loop:
scm_port *pt = SCM_PTAB_ENTRY (port_or_fd);
int remaining = (cend - offset) * sz;
char *source = SCM_CHARS (v) + (cstart + offset) * sz;
- scm_ptobfuns *ptob = &scm_ptobs[SCM_PTOBNUM (port_or_fd)];
+ scm_ptob_descriptor *ptob = &scm_ptobs[SCM_PTOBNUM (port_or_fd)];
ans = cend - offset;
if (pt->rw_active == SCM_PORT_READ)