mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 14:50:19 +02:00
*** empty log message ***
This commit is contained in:
parent
0b6881fa6c
commit
f15913d08f
4 changed files with 56 additions and 5 deletions
|
@ -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>
|
1999-07-24 Gary Houston <ghouston@easynet.co.uk>
|
||||||
|
|
||||||
* gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
|
* gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
|
||||||
|
@ -17,6 +65,11 @@
|
||||||
(SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
|
(SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
|
||||||
SCM_INOUT_PCLASS_INDEX): Added.
|
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>
|
1999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
|
||||||
|
|
||||||
* init.c: Make sure that scm_post_boot_init_modules is called only
|
* init.c: Make sure that scm_post_boot_init_modules is called only
|
||||||
|
|
|
@ -38,7 +38,7 @@ libguile_la_SOURCES = \
|
||||||
alist.c arbiters.c async.c backtrace.c boolean.c chars.c \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
list.x load.x macros.x mallocs.x modules.x net_db.x \
|
||||||
|
|
|
@ -66,8 +66,6 @@ struct scm_fport {
|
||||||
/* test whether fdes supports random access. */
|
/* test whether fdes supports random access. */
|
||||||
#define SCM_FDES_RANDOM_P(fdes) ((lseek (fdes, 0, SEEK_CUR) == -1) ? 0 : 1)
|
#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_setbuf0 (SCM port);
|
||||||
extern SCM scm_setvbuf (SCM port, SCM mode, SCM size);
|
extern SCM scm_setvbuf (SCM port, SCM mode, SCM size);
|
||||||
|
|
|
@ -1695,7 +1695,7 @@ loop:
|
||||||
scm_port *pt = SCM_PTAB_ENTRY (port_or_fd);
|
scm_port *pt = SCM_PTAB_ENTRY (port_or_fd);
|
||||||
int remaining = (cend - offset) * sz;
|
int remaining = (cend - offset) * sz;
|
||||||
char *source = SCM_CHARS (v) + (cstart + 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;
|
ans = cend - offset;
|
||||||
if (pt->rw_active == SCM_PORT_READ)
|
if (pt->rw_active == SCM_PORT_READ)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue