| Commit message (Expand) | Author | Age | Files | Lines |
* | Elide syscalls in fdes->port...* libguile/fports.h (scm_t_fport): Add options field.
(SCM_FDES_RANDOM_P): Deprecate.
(scm_i_fdes_to_port): Add options argument.
* libguile/fports.c (scm_i_fdes_to_port): Add options argument. Only
verify FD if SCM_FPORT_OPTION_VERIFY is there.
(scm_fdes_to_port, scm_open_file_with_encoding): Adapt to
scm_i_fdes_to_port changes.
(fport_random_access_p): Don't try to seek if NOT_SEEKABLE option is
set.
* libguile/deprecated.h:
* libguile/deprecated.c (SCM_FDES_RANDOM_P): Deprecate.
* NEWS: Add deprecation.
* libguile/filesys.c:
* libguile/ioext.c:
* libguile/posix.c:
* libguile/read.c:
* libguile/socket.c: Adapt callers.
| Andy Wingo | 2017-02-14 | 1 | -9/+20 |
* | Allow mkstemp! to have optional "mode" argument...* m4/mkstemp.m4: Remove.
* lib/mkstemp.c: Remove.
* lib/mkostemp.c: New file.
* m4/mkostemp.m4: New file.
* lib/Makefile.am:
* m4/gnulib-cache.m4:
* m4/gnulib-comp.m4: Remove mkstemp module, replace with mkostemp.
* libguile/fports.h:
* libguile/fports.c (scm_i_mode_to_open_flags): Factor out helper to
parse mode string to open flags.
(scm_open_file_with_encoding): Use the new helper.
* libguile/filesys.c:
(scm_i_mkstemp): Adapt to take optional second argument, being a mode
string. Use mkostemp.
(scm_mkstemp): Backwards compatible shim that calls scm_i_mkstemp.
* doc/ref/posix.texi:
* NEWS: Update.
* module/system/base/compile.scm (call-with-output-file/atomic): Pass
"wb" as mode, to cause O_BINARY to be added on MinGW.
| Andy Wingo | 2016-07-25 | 1 | -0/+2 |
* | Use heap-allocated port types instead of ptobnums...This removes a limitation on the number of port types, simplifies the
API, and removes a central point of coordination.
* libguile/ports-internal.h (struct scm_t_port_type): Rename from
scm_t_ptob_descriptor, now that it's private. Add GOOPS class
fields.
(struct scm_t_port): Rename from struct scm_port, especially
considering that deprecated.h redefines scm_port using the
preprocessor :(.
* libguile/ports.h: Add definitions of SCM_PORT and SCM_PORT_TYPE,
though the scm_t_port and scm_t_port_type types are incomplete.
(SCM_TC2PTOBNUM, SCM_PTOBNUM, SCM_PTOBNAME): Remove, as there are no
more typecodes for port types.
(scm_c_num_port_types, scm_c_port_type_ref, scm_c_port_type_add_x):
Remove.
(scm_make_port_type): Return a scm_t_port_type*. All methods adapted
to take a scm_t_port_type* instead of a ptobnum.
(scm_c_make_port_with_encoding, scm_c_make_port): Take a port type
pointer instead of a tag.
(scm_new_port_table_entry): Remove; not useful.
* libguile/ports.c: Remove things related to the port kind table. Adapt
uses of SCM_PORT_DESCRIPTOR / scm_t_ptob_descriptor to use
SCM_PORT_TYPE and scm_t_port_type.
* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/filesys.c:
* libguile/fports.c:
* libguile/fports.h:
* libguile/print.c:
* libguile/r6rs-ports.c:
* libguile/strports.c:
* libguile/strports.h:
* libguile/tags.h:
* libguile/vports.c:
* test-suite/standalone/test-scm-c-read.c: Adapt to change.
* libguile/goops.c (scm_class_of, make_port_classes)
(scm_make_port_classes, create_port_classes): Adapt to store the
classes in the ptob.
| Andy Wingo | 2016-05-13 | 1 | -2/+3 |
* | Move setvbuf impl to ports.[ch]...* libguile/fports.h (scm_setbuf0): Remove extraneous declaration.
* libguile/fports.c:
* libguile/ports.c:
* libguile/ports.c (scm_setvbuf): Move setvbuf to ports.[ch].
(scm_init_ports): Move _IONBF, _IOLBF, _IOFBF definitions here.
| Andy Wingo | 2016-04-04 | 1 | -2/+0 |
* | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
GUILE-VERSION
libguile/array-map.c
libguile/fports.h
libguile/gc.h
libguile/inline.h
libguile/ports.c
libguile/ports.h
libguile/print.c
libguile/r6rs-ports.c
libguile/read.c
test-suite/tests/00-socket.test
| Mark H Weaver | 2013-04-14 | 1 | -0/+3 |
|\ |
|
| * | Add keyword arguments to file opening procedures....* libguile/fports.c (scm_open_file_with_encoding): New API function,
containing the code previously found in 'scm_open_file', but modified
to accept the new 'guess_encoding' and 'encoding' arguments.
(scm_open_file): Now just a simple wrapper that calls
'scm_open_file_with_encoding'.
(scm_i_open_file): New implementation of 'open-file' that accepts
keyword arguments '#:guess-encoding' and '#:encoding', and calls
'scm_open_file_with_encoding'.
(scm_init_fports_keywords): New initialization function that gets
called after keywords are initialized.
* libguile/fports.h (scm_open_file_with_encoding,
scm_init_fports_keywords): Add prototypes.
* libguile/init.c (scm_i_init_guile): Call 'scm_init_fports_keywords'.
* module/ice-9/boot-9.scm: Add enhanced versions of 'open-input-file',
'open-output-file', 'call-with-input-file', 'call-with-output-file',
'with-input-from-file', 'with-output-to-file', and
'with-error-to-file', that accept keyword arguments '#:binary',
'#:encoding', and (for input port constructors) '#:guess-encoding'.
* doc/ref/api-io.texi (File Ports): Update documentation.
* test-suite/tests/ports.test ("keyword arguments for file openers"):
Add tests.
| Mark H Weaver | 2013-04-07 | 1 | -0/+3 |
* | | move revealed-count mechanism to fports.c...* libguile/fports.c (scm_revealed_count, scm_port_revealed)
(scm_set_port_revealed_x, scm_adjust_port_revealed_x): Move these APIs
here, and only operate on fports. To keep revealed ports alive, now
we will just keep them in a data structure that the GC knows about --
a static list.
* libguile/fports.h: Add revealed count to scm_t_fport, and move decls
of revealed-count functions here.
* libguile/ports.h:
* libguile/ports.c: Adapt to change. Remove SCM_REVEALED and
SCM_SETREVEALED; since they only apply to fports now, keeping them
around would be inviting type errors.
(finalize_port): We don't need to worry about resuscitating ports
here.
* libguile/init.c: Use the scm_set_port_revealed_x function to set the
revealed counts on stream ports.
| Andy Wingo | 2012-02-19 | 1 | -1/+13 |
* | | refactor tc7 and tc16 checks...* libguile/tags.h (SCM_HAS_TYP7, SCM_HAS_TYP7S, SCM_HAS_TYP16): New
macros.
* libguile/bytevectors.h (SCM_BYTEVECTOR_P):
* libguile/control.h (SCM_PROMPT_P):
* libguile/filesys.h (SCM_DIRP):
* libguile/fluids.h (SCM_WITH_FLUIDS_P, SCM_FLUID_P)
(SCM_I_DYNAMIC_STATE_P):
* libguile/foreign.h (SCM_POINTER_P):
* libguile/fports.h (SCM_FPORTP):
* libguile/frames.h (SCM_VM_FRAME_P):
* libguile/hashtab.h (SCM_HASHTABLE_P):
* libguile/inline.h (scm_get_byte_or_eof):
* libguile/numbers.h (SCM_REALP, SCM_BIGP, SCM_COMPLEXP, SCM_FRACTIONP):
* libguile/objcodes.h (SCM_OBJCODE_P):
* libguile/ports.h (SCM_OUTPUT_PORT_P):
* libguile/programs.h (SCM_PROGRAM_P):
* libguile/smob.h (SCM_SMOB_PREDICATE):
* libguile/srfi-14.h (SCM_CHARSETP):
* libguile/strings.c (IS_STRING):
* libguile/strports.h (SCM_STRPORTP):
* libguile/symbols.h (scm_is_symbol):
* libguile/variable.h (SCM_VARIABLEP):
* libguile/vectors.h (SCM_I_IS_VECTOR, SCM_I_IS_NONWEAK_VECTOR):
* libguile/vm-i-system.c (call, tail-call, mv-call)
* libguile/vm.h (SCM_VM_P, SCM_VM_CONT_P):
* libguile/weak-set.c (SCM_WEAK_SET_P):
* libguile/weak-table.c (SCM_WEAK_TABLE_P):
* libguile/weak-vector.h (SCM_I_WVECTP): Use them.
| Andy Wingo | 2011-10-24 | 1 | -2/+2 |
|/ |
|
* | Remove seek/truncate shortcuts to file ports....Suggested by Neil.
* libguile/fports.c (fport_seek_or_seek64): Rename to `fport_seek ()'.
(fport_seek, scm_i_fport_seek, scm_i_fport_truncate): Remove.
* libguile/fports.h (scm_i_fport_seek, scm_i_fport_truncate): Remove
declarations.
* libguile/ports.c (scm_seek): Remove shortcut that would call out to
`scm_i_fport_seek ()'.
(scm_truncate_file): Likewise.
| Ludovic Courtès | 2009-06-28 | 1 | -3/+1 |
* | Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow.
module/srfi/*.scm
module/rnrs/*.scm
module/scripts/*.scm
testsuite/*.scm
guile-readline/*
)
| Neil Jerram | 2009-06-17 | 1 | -6/+7 |
* | Add `SCM_INTERNAL' macro, use it. | Ludovic Courtès | 2008-05-31 | 1 | -5/+5 |
* | merge from 1.8 branch | Kevin Ryde | 2006-10-09 | 1 | -0/+3 |
* | merge from 1.8 branch | Kevin Ryde | 2006-04-17 | 1 | -1/+1 |
* | The FSF has a new address. | Marius Vollmer | 2005-05-23 | 1 | -1/+1 |
* | * fports.h, fports.c (scm_i_fdes_to_port): New, like...scm_fdes_to_port, but take mode bits directly instead of as a C
string.
(scm_i_fdes_to_port): Implement using above.
(scm_open_file): Use scm_i_fdes_to_port together with
scm_i_mode_bits to avoid accessing internals of SCM string from C.
* vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
with scm_i_mode_bits to avoid accessing internals of SCM string
from C.
* ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
SCM string as argument.
* ports.c (scm_i_void_port): New, like scm_void_port but take mode
bits directly instead of C string.
(scm_void_port): Implement using above.
(scm_sys_make_void_port): Use scm_i_void_port together with
scm_i_mode_bits to avoid accessing internals of SCM string.
* convert.i.c, backtrace.c, strop.c, strorder.c, strports.c,
struct.c, unif.c, ports.c: Use SCM_I_STRING_CHARS,
SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH instead of
SCM_STRING_CHARS, SCM_STRING_UCHARS, and SCM_STRING_LENGTH,
respectively. Also, replaced scm_return_first with more explicit
scm_remember_upto_here_1, etc, or introduced them in the first
place.
| Marius Vollmer | 2004-08-12 | 1 | -0/+4 |
* | Changed license terms to the plain LGPL thru-out. | Marius Vollmer | 2003-04-05 | 1 | -35/+11 |
* | Prefixed each each exported symbol with SCM_API. | Marius Vollmer | 2001-11-02 | 1 | -8/+8 |
* | * Remove deprecated macros and typenames....* Rename header macros to SCM_<filename>_H.
* Prefer !SCM_<foo> over SCM_N<foo>.
| Dirk Herrmann | 2001-08-31 | 1 | -11/+8 |
* | * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,... chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
guile-func-name-check.in, guile-snarf-docs-texi.in,
guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
objprop.c, objprop.h, options.c, options.h, random.h,
regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
version.c, version.h: Updated copyright notice.
| Martin Grabmüller | 2001-07-19 | 1 | -1/+1 |
* | Remove "face-lift" comment. | Thien-Thi Nguyen | 2001-07-09 | 1 | -2/+0 |
* | replace "scm_*_t" with "scm_t_*". | Marius Vollmer | 2001-06-14 | 1 | -5/+5 |
* | * validate.h...(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
new macros.
* unif.h: type renaming:
scm_array -> scm_array_t
scm_array_dim -> scm_array_dim_t
the old names are deprecated, all in-Guile uses changed.
* tags.h (scm_ubits_t): new typedef, representing unsigned
scm_bits_t.
* stacks.h: type renaming:
scm_info_frame -> scm_info_frame_t
scm_stack -> scm_stack_t
the old names are deprecated, all in-Guile uses changed.
* srcprop.h: type renaming:
scm_srcprops -> scm_srcprops_t
scm_srcprops_chunk -> scm_srcprops_chunk_t
the old names are deprecated, all in-Guile uses changed.
* gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
vectors.c, vports.c, weaks.c:
various int/size_t -> size_t/scm_bits_t changes.
* random.h: type renaming:
scm_rstate -> scm_rstate_t
scm_rng -> scm_rng_t
scm_i_rstate -> scm_i_rstate_t
the old names are deprecated, all in-Guile uses changed.
* procs.h: type renaming:
scm_subr_entry -> scm_subr_entry_t
the old name is deprecated, all in-Guile uses changed.
* options.h (scm_option_t.val): unsigned long -> scm_bits_t.
type renaming:
scm_option -> scm_option_t
the old name is deprecated, all in-Guile uses changed.
* objects.c: various long -> scm_bits_t changes.
(scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
* numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
SCM_I_FIXNUM_BIT.
* num2integral.i.c: new file, multiply included by numbers.c, used
to "templatize" the various integral <-> num conversion routines.
* numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
deprecated.
(scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
scm_num2size): new functions.
* modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x
* load.c: change int -> size_t in various places (where the
variable is used to store a string length).
(search-path): call scm_done_free, not scm_done_malloc.
* list.c (scm_ilength): return a scm_bits_t, not long.
some other {int,long} -> scm_bits_t changes.
* hashtab.c: various [u]int -> scm_bits_t changes.
scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
(scm_ihashx): n: uint -> scm_bits_t
use scm_bits2num instead of scm_ulong2num.
* gsubr.c: various int -> scm_bits_t changes.
* gh_data.c (gh_scm2double): no loss of precision any more.
* gh.h (gh_str2scm): len: int -> size_t
(gh_{get,set}_substr): start: int -> scm_bits_t,
len: int -> size_t
(gh_<num>2scm): n: int -> scm_bits_t
(gh_*vector_length): return scm_[u]size_t, not unsigned long.
(gh_length): return scm_bits_t, not unsigned long.
* fports.h: type renaming:
scm_fport -> scm_fport_t
the old name is deprecated, all in-Guile uses changed.
* fports.c (fport_fill_input): count: int -> scm_bits_t
(fport_flush): init_size, remaining, count: int -> scm_bits_t
* debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
those prototypes, as the functions they prototype don't exist.
* fports.c (default_buffer_size): int -> size_t
(scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
default_size: int -> size_t
(scm_setvbuf): csize: int -> scm_bits_t
* fluids.c (n_fluids): int -> scm_bits_t
(grow_fluids): old_length, i: int -> scm_bits_t
(next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
scm_bits_t
(scm_c_with_fluids): flen, vlen: int -> scm_bits_t
* filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
the new and shiny SCM_NUM2INT.
* extensions.c: extension -> extension_t (and made a typedef).
* eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
there are no nasty surprises if/when the various deeply magic tag
bits move somewhere else.
* eval.c: changed the locals used to store results of SCM_IFRAME,
scm_ilength and such to be of type scm_bits_t (and not int/long).
(iqq): depth, edepth: int -> scm_bits_t
(scm_eval_stack): int -> scm_bits_t
(SCM_CEVAL): various vars are not scm_bits_t instead of int.
(check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
i: int -> scm_bits_t
* environments.c: changed the many calls to scm_ulong2num to
scm_ubits2num.
(import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
* dynwind.c (scm_dowinds): delta: long -> scm_bits_t
* debug.h: type renaming:
scm_debug_info -> scm_debug_info_t
scm_debug_frame -> scm_debug_frame_t
the old names are deprecated, all in-Guile uses changed.
(scm_debug_eframe_size): int -> scm_bits_t
* debug.c (scm_init_debug): use scm_c_define instead of the
deprecated scm_define.
* continuations.h: type renaming:
scm_contregs -> scm_contregs_t
the old name is deprecated, all in-Guile uses changed.
(scm_contregs_t.num_stack_items): size_t -> scm_bits_t
(scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
* continuations.c (scm_make_continuation): change the type of
stack_size form long to scm_bits_t.
* ports.h: type renaming:
scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
scm_port -> scm_port_t
scm_ptob_descriptor -> scm_ptob_descriptor_t
the old names are deprecated, all in-Guile uses changed.
(scm_port_t.entry): int -> scm_bits_t.
(scm_port_t.line_number): int -> long.
(scm_port_t.putback_buf_size): int -> size_t.
* __scm.h (long_long, ulong_long): deprecated (they pollute the
global namespace and have little value besides that).
(SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
SCM handle).
(ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
exist (for size_t & ptrdiff_t)
(scm_sizet): deprecated.
* Makefile.am (noinst_HEADERS): add num2integral.i.c
| Michael Livshin | 2001-05-24 | 1 | -3/+7 |
* | * Added a file-port? primitive. | Dirk Herrmann | 2001-01-25 | 1 | -0/+1 |
* | * Made the port implementations less tightly coupled within guile. | Dirk Herrmann | 2001-01-25 | 1 | -4/+6 |
* | *** empty log message *** | Gary Houston | 2001-01-24 | 1 | -1/+0 |
* | Updated copyrights | Mikael Djurfeldt | 2000-06-12 | 1 | -1/+1 |
* | * Replace SCM_UNPACK_CAR appropriately....* Only access cons cells via SCM_{SET}?C[AD]R.
* gc.c: Remove unused struct member variable 'valid'.
| Dirk Herrmann | 2000-05-25 | 1 | -4/+4 |
* | * *.[hc]: add Emacs magic at the end of file, to ensure GNU... indentation style.
| Michael Livshin | 2000-03-19 | 1 | -0/+6 |
* | *** empty log message *** | Mikael Djurfeldt | 2000-03-12 | 1 | -3/+3 |
* | * async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,... feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h,
hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c,
objects.h, options.c, pairs.h, ports.c, ports.h, print.c,
procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c,
stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h,
throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c,
weaks.h (SCM_SCM, SCM_BITS, SCM_CARBITS): Renamed from
SCM_ASSCM, SCM_ASWORD, SCM_CARW).
| Mikael Djurfeldt | 2000-03-12 | 1 | -3/+3 |
* | *.[ch]: make a distinction between SCM as a generic...name for a Scheme object (now a void*), and SCM as 32 bit word for
storing tags and immediates (now a long int). Introduced
SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious
code in the process: arbiter.c (use macros), unif.c (scm_array_p),
| Greg J. Badros | 2000-03-09 | 1 | -3/+3 |
* | * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,...added append docs from R4RS.
* strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
Thanks Dirk Hermann!
* chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann!
* *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
Drop use of SCM_P for function prototypes... assume an ANSI C
compiler. Thanks Dirk Hermann!
| Greg J. Badros | 2000-03-02 | 1 | -1/+1 |
* | * *.h: Use SCM_NIMP(X) && in all the FOOP macros....* *.[ch]: Use do { ... } while (0) idiom in macros that expanded
to a bare block.
| Greg J. Badros | 1999-12-16 | 1 | -4/+7 |
* | *** empty log message *** | Mikael Djurfeldt | 1999-07-24 | 1 | -2/+0 |
* | * fports.c, fports.h, gc.c, gdbint.c, ioext.c, ports.c, ports.h,...scmsigs.c, strports.c, vports.c: Install the sources which
actually correspond to the changes described below. I got the
ChangeLog entries and the patch from two different places...
| Jim Blandy | 1999-06-12 | 1 | -9/+1 |
* | * ports.h (scm_port): make read_pos a pointer to const.... strports.c: take care of rw_active and rw_randow.
fports.c: scm_fport_drain_input: removed. do it all in ports.c.
strports.c (scm_mkstrport): check that pos is reasonable.
ioext.c (scm_ftell, scm_fseek): use lseek.
(SCM_CLEAR_BUFFERS): macro deleted.
ioext.c (redirect_port: use ptob fflush, read_flush.
ports.h (scm_ptobfuns): add ftruncate.
ports.c (scm_newptob): set ftruncate.
adjust ptob tables.
* ports.c (scm_ftruncate): new procedure.
fports.c (local_ftrunate), strports.c (str_ftruncate): new procs.
strports.c (st_seek, st_grow_port): new procs.
fports.h (scm_port): change size types from int to off_t.
ports.c (scm_init_ports): initialise the seek symbols here
instead of in ioext.c.
strports.c (scm_call_with_output_string): start with an empty
string, so seek and ftruncate can be used.
* ports.h (scm_ptobfuns): add a read_flush procedure which is the
equivalent to fflush for the read buffer.
* ports.c (scm_newptob): set read_flush.
ports.c (void_port_ptob): set read_flush.
fports.c (local_read_flush): new proc. add to ptob.
strport.c (st_read_flush): likewise.
vport.c (sf_read_flush): likewise.
fports.h (struct scm_fport): remove random member. there's nothing
left but fdes. leaving it as a struct to allow for future changes.
fports.c: replace usage of scm_fport::random with scm_port::rw_random.
ports.c: (scm_putc, scm_puts, scm_lfwrite): call the read_flush
ptob proc if the read buffer is filled.
* fports.h (SCM_FPORT_CLEAR_BUFFERS): rename to SCM_CLEAR_BUFFERS
and move to ioext.c.
* fports.h (SCM_MAYBE_DRAIN_INPUT): moved to ports.c.
use ptob for seek. take ptob instead of fport arg.
* fports.h (SCM_FDES_RANDOM_P): new macro. use it in
scm_fdes_to_port and scm_redirect_port.
* fports.h (SCM_CLEAR_BUFFERS): new macro.
* fports.h (SCM_FPORT_FDES): new macro.
* posix.c (scm_pipe): use fport buffer.
* unif.c: include fports.h instead of genio.h.
* fports.c (scm_fdes_wait_for_input, scm_fport_fill_buffer): new
procedures.
(local_fgetc): use them.
(local_ffwrite): use buffer.
(local_fgets): use buffer.
(scm_setbuf0): deleted.
(scm_setvbuf): set the buffer.
(scm_setfileno): deleted.
(scm_evict_ports): set fdes directly.
* (scm_freopen): deleted. doesn't seem useful in Guile.
(scm_stdio_to_port): deleted.
fports.h (struct scm_fport): add shortbuf member to avoid separate
code for unbuffered ports.
(SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP): moved
from ports.h.
* fports.c, fports.h (scm_fport_drain_input): new procedure.
* ports.c (scm_drain_input): call scm_fport_drain_input.
* scm_fdes_waiting_p: new procedure.
* fports.c (scm_fdes_to_port): allocate read and/or write buffers.
(scm_input_waiting_p): check the buffer.
(local_fgetc, local_fflush, local_fputc): likewise.
* fports.h (scm_fport): read/write_buf,_pos,_buf_end,,_buf_size:
new members.
* init.c (scm_init_standard_ports): pass fdes instead of FILE *.
* * ports.c (scm_drain_input): new procedure.
ports.h: prototype.
* fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY,
pre_read, pre_write): removed.
(local_fputc, local_fputs, local_ffwrite): use write, not stdio.
(scm_standard_stream_to_port): change first arg from FILE * to
int fdes.
(local_fflush): flush fdes, not FILE *.
* fports.h (SCM_NOFTELL): removed.
* genio.c, ports.c: don't include filesys.h.
* genio.c (scm_getc): don't use scm_internal_select if FPORT.
do it in fports.c:local_fgetc.
* genio.c: don't use SCM_SYSCALL when calling ptob procedures.
do it where it's needed in the port smobs.
* filesys.c (scm_input_waiting_p): moved to fports.c, stdio
buffer support removed. take SCM arg, not FILE *.
* filesys.h: prototype moved too.
* fports.c (scm_fdes_to_port): new procedure.
(local_fgetc): use read not fgetc.
(local_fclose): use close, not fclose.
(local_fgets): use read, not fgets
* fports.h: prototype for scm_fdes_to_port.
* fports.h (scm_fport): new struct.
* fports.c (scm_open_file): use open, not fopen.
#include fcntl.h
* ports.h (struct scm_port_table): change stream from SCM to void *.
* ports.c (scm_add_to_port_table): check for memory allocation error.
(scm_prinport): remove MSDOS hair.
(scm_void_port): set stream to 0 instead of SCM_BOOL_F.
(scm_close_port): don't throw errors: do it in fports.c.
| Jim Blandy | 1999-06-09 | 1 | -4/+25 |
* | * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,...continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
list.c, list.h, load.c, load.h, mallocs.c, markers.c,
mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
copyright years.
| Jim Blandy | 1998-10-19 | 1 | -1/+1 |
* | * fports.h (scm_setbuf0, scm_setvbuf, scm_setfileno,...scm_evict_ports, scm_open_file, scm_stdio_to_port): Get rid of
SCM_P macro.
Centralize the creation of port objects based on stdio FILE * in
fports.c; don't just throw them together anywhere.
* fports.c (scm_stdio_to_port): Make NAME a SCM value, which is
what the rest of Guile wants. Don't set the revealed count;
that's only appropriate for stdin, stdout, stderr.
(scm_standard_stream_to_port): This function does set the revealed
count.
* init.c (scm_init_standard_ports): Use scm_standard_stream_to_port,
not scm_stdio_to_port.
* filesys.c (scm_open): Call scm_stdio_to_port; don't write it out.
* fports.c (scm_open_file): Same.
* posix.c (scm_pipe): Same.
* socket.c (scm_sock_fd_to_port): Same.
* ioext.c (scm_fdopen): Same.
(scm_freopen): Moved from here to...
* fports.c (scm_freopen): ... here. This is really something that
munges the internals of an fport, so it should go here.
* fports.h (scm_stdio_to_port): Adjust prototype.
(scm_standard_stream_to_port, scm_freopen): New protoypes.
* ioext.h (scm_freopen): Prototype removed.
| Jim Blandy | 1998-10-09 | 1 | -6/+7 |
* | * ioext.h: fix up prototypes....* ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
Scheme name is now dup->fdes.
(scm_dup_to_fdes): make the second argument optional and
fold in the functionality of scm_primitive_dup.
(scm_primitive_dup): deleted.
* fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
* fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
ultrix are defined. Use setvbuf instead of setbuf.
(scm_setvbuf): new procedure.
(scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
(scm_setfileno): moved from ioext.c.
(scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
(top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.
* boot-9.scm (move->fdes, dup->port): use dup->fdes, not primitive-dup.
(dup->fdes): deleted, now done in C.
| Gary Houston | 1997-07-29 | 1 | -0/+2 |
* | * fluids.c (next_fluid_num): don't do...SCM_THREAD_CRITICAL_SECTION_START/END unless USE_THREADS is defined.
* ports.h: prototypes too.
* ports.c (scm_mode_bits, scm_port_mode): moved from fports.c.
* fports.h: prototype too.
* fports.c (scm_evict_ports): moved from ioext.c.
* ports.c (scm_close_port): return a boolean instead of unspecified.
throw an error if an error other than EBADF occurs.
* filesys.h: scm_close prototype.
* filesys.c (scm_close): new procedure, can close file descriptors
and ports (scsh compatible).
* ports.c (scm_flush_all_ports): SCM_PROC incorrectly allowed an
optional argument.
| Gary Houston | 1997-07-20 | 1 | -2/+1 |
* | * Lots of files: New address for FSF. | Jim Blandy | 1997-05-26 | 1 | -3/+3 |
* | * ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELD...wan't defined. Don't include fd.h.
* Previously fd.h was regenerated whenever configure was run,
forcing a couple of files to be recompiled.
* fd.h.in: deleted, SET_FILE_FD_FIELD moved to ioext.c.
* configure.in: AC_DEFINE FD_SETTER instead of HAVE_FD_SETTER.
Check for _fileno as well as _file.
Don't output fd.h.
* ioext.c: don't fd.h.
* acconfig.h: remove duplicate HAVE_FD_SETTER and change the
other to FD_SETTER.
* Change the stratigy for getting information about errno
(and now signal number) values, e.g., ENOSYS, SIGKILL. Instead of
generating lists of symbols during the build process, which will
not always work, include comprehensive lists in the distribution.
To help keep the lists up to date, the "check_signals" and
"check_errnos" make targets can be used.
* configure.in: don't check for a command to extract errno codes.
* Makefile.am: update file lists, remove errnos.list and errnos.c
targets, add cpp_err_symbols.c, cpp_sig_symbols.c, check_signals,
check_errnos targets.
(CLEANFILES): remove errnos.c and errnos.list, add
cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new
cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
* errnos.default: deleted.
* cpp_signal.c: new file.
* cpp_errno.c: renamed from errnos_get.c.
* cpp_err_symbols, cpp_sig_symbols: new files.
* cpp_cnvt.awk: renamed from errnos_cnvt_awk.
* error.c (scm_init_error): #include cpp_err_symbols instead of
errnos.c.
* posix.c (scm_init_posix): don't intern signal symbols. #include
cpp_sig_symbols.c.
* strop.c (scm_i_index): allow the lower bound to be equal to the
length of the string, so a null string doesn't always give an error.
* posix.h: new prototypes.
* posix.c (scm_status_exit_val, scm_status_term_sig,
scm_status_stop_sig): new functions, as in scsh. They break down
process status values as returned by waitpid.
| Gary Houston | 1997-03-29 | 1 | -1/+1 |
* | * * fports.c (scm_stdio_to_port): New function. Its guts used to be... written out several times in scm_start_stack.
* fports.h: New declaration for the above.
| Jim Blandy | 1996-10-23 | 1 | -0/+1 |
* | * __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,...arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
chars.c, chars.h, continuations.c, continuations.h, debug.c,
debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
declare functions with prototypes. (Patch thanks to Marius
Vollmer.)
| Jim Blandy | 1996-10-14 | 1 | -20/+5 |
* | * ports.h (scm_port_table): remove file_name member for now, it seems... undesirable.
* fports.c (scm_open_file): don't set file_name in PTAB.
(prinfport): don't use file_name in PTAB.
* ioext.c (scm_sys_duplicate_port): don't set file_name in PTAB.
* ports.c (scm_add_to_port_table): don't intialize file_name.
(scm_port_file_name): remove for now.
* gc.c (scm_gc_mark): don't mark PTAB file_name.
* fports.h (scm_mkfile): prototype deleted.
* fports.c (scm_mkfile): merged into scm_open_file to simplify.
| Gary Houston | 1996-09-16 | 1 | -1/+0 |
* | C files should #include only the header files they need, not...libguile.h (which #includes all the header files); the pointless
recompilation was wasting my time.
* Makefile.in (all .o dependency lists): Regenerated.
* libguile.h: Don't try to get a definition for size_t here...
* __scm.h: Do it here.
* _scm.h: Since this is the internal libguile header, put things
here that all (or a majority) of the libguile files will want.
Don't #include <libguile.h> here; that generates dependencies on
way too much. Instead, get "__scm.h", "error.h", "pairs.h",
"list.h", "gc.h", "gsubr.h", "procs.h", "numbers.h", "symbols.h",
"boolean.h", "strings.h", "vectors.h", "root.h", "ports.h", and
"async.h".
* alist.c: Get "eq.h", "list.h", "alist.h".
* append.c: Get "append.h", "list.h".
* arbiters.c: Get "arbiters.h", "smob.h".
* async.c: Get "async.h", "smob.h", "throw.h", "eval.h".
* boolean.c: Get "boolean.h".
* chars.c: Get "chars.h".
* continuations.c: Get "continuations.h", "dynwind.h", "debug.h",
"stackchk.h".
* debug.c: Get "debug.h", "feature.h", "read.h", "strports.h",
"continuations.h", "alist.h", "srcprop.h", "procprop.h", "smob.h",
"genio.h", "throw.h", "eval.h".
* dynwind.c: Get "dynwind.h", "alist.h", "eval.h".
* eq.c: Get "eq.h", "unif.h", "smob.h", "strorder.h",
"stackchk.h".
* error.c: Get "error.h", "throw.h", "genio.h", "pairs.h".
* eval.c: Get "eval.h", "stackchk.h", "srcprop.h", "debug.h",
"hashtab.h", "procprop.h", "markers.h", "smob.h", "throw.h",
"continuations.h", "eq.h", "sequences.h", "alist.h", "append.h",
"debug.h".
* fdsocket.c: Get "fdsocket.h", "unif.h", "filesys.h".
* feature.c: Get "feature.h".
* files.c: Get "files.h".
* filesys.c: Get "filesys.h", "smob.h", "genio.h".
* fports.c: Get "fports.h", "markers.h".
* gc.c: Get "async.h", "unif.h", "smob.h", "weaks.h",
"genio.h", "struct.h", "stackchk.h", "stime.h".
* gdbint.c: Get "gdbint.h", "chars.h", "eval.h", "print.h",
"read.h", "strports.h", "tag.h".
* genio.c: Get "genio.h", "chars.h".
* gsubr.c: Get "gsubr.h", "genio.h".
* hash.c: Get "hash.h", "chars.h".
* hashtab.c: Get "hashtab.h", "eval.h", "hash.h", "alist.h".
* init.c: Get everyone who has an scm_init_mumble function:
"weaks.h", "vports.h", "version.h", "vectors.h", "variable.h",
"unif.h", "throw.h", "tag.h", "symbols.h", "struct.h",
"strports.h", "strorder.h", "strop.h", "strings.h", "stime.h",
"stackchk.h", "srcprop.h", "socket.h", "simpos.h", "sequences.h",
"scmsigs.h", "read.h", "ramap.h", "procs.h", "procprop.h",
"print.h", "posix.h", "ports.h", "pairs.h", "options.h",
"objprop.h", "numbers.h", "mbstrings.h", "mallocs.h", "load.h",
"list.h", "kw.h", "ioext.h", "hashtab.h", "hash.h", "gsubr.h",
"gdbint.h", "gc.h", "fports.h", "filesys.h", "files.h",
"feature.h", "fdsocket.h", "eval.h", "error.h", "eq.h",
"dynwind.h", "debug.h", "continuations.h", "chars.h", "boolean.h",
"async.h", "arbiters.h", "append.h", "alist.h".
* ioext.c: Get "ioext.h", "fports.h".
* kw.c: Get "kw.h", "smob.h", "mbstrings.h", "genio.h".
* list.c: Get "list.h", "eq.h".
* load.c: Get "load.h", "eval.h", "read.h", "fports.h".
* mallocs.c: Get "smob.h", "genio.h".
* markers.c: Get "markers.h".
* mbstrings.c: Get "mbstrings.h", "read.h", "genio.h", "unif.h",
"chars.h".
* numbers.c: Get "unif.h", "genio.h".
* objprop.c: Get "objprop.h", "weaks.h", "alist.h", "hashtab.h".
* options.c: Get "options.h".
* ports.c: Get "ports.h", "vports.h", "strports.h", "fports.h",
"markers.h", "chars.h", "genio.h".
* posix.c: Get "posix.h", "sequences.h", "feature.h", "unif.h",
"read.h", "scmsigs.h", "genio.h", "fports.h".
* print.c: Get "print.h", "unif.h", "weaks.h", "read.h",
"procprop.h", "eval.h", "smob.h", "mbstrings.h", "genio.h",
"chars.h".
* procprop.c: Get "procprop.h", "eval.h", "alist.h".
* procs.c: Get "procs.h".
* ramap.c: Get "ramap.h", "feature.h", "eval.h", "eq.h",
"chars.h", "smob.h", "unif.h".
* read.c: Get "alist.h", "kw.h", "mbstrings.h", "unif.h",
"eval.h", "genio.h", "chars.h".
* root.c: Get "root.h", "stackchk.h".
* scmsigs.c: Get "scmsigs.h".
* sequences.c: Get "sequences.h".
* simpos.c: Get "simpos.h", "scmsigs.h".
* smob.c: Get "smob.h".
* socket.c: Get "socket.h", "feature.h".
* srcprop.c: Get "srcprop.h", "weaks.h", "hashtab.h", "debug.h",
"alist.h", "smob.h".
* stackchk.c: Get "stackchk.h", "genio.h".
* stime.c: Get "stime.h"."libguile/continuations.h".
* strings.c: Get "strings.h", "chars.h".
* strop.c: Get "strop.h", "chars.h".
* strorder.c: Get "strorder.h", "chars.h".
* strports.c: Get "strports.h", "print.h", "eval.h", "unif.h".
* struct.c: Get "struct.h", "chars.h".
* symbols.c: Get "symbols.h", "mbstrings.h", "alist.h",
"variable.h", "eval.h", "chars.h".
* tag.c: Get "tag.h", "struct.h", "chars.h".
* throw.c: Get "throw.h", "continuations.h", "debug.h",
"dynwind.h", "eval.h", "alist.h", "smob.h", "genio.h".
* unif.c: Get "unif.h", "feature.h", "strop.h", "sequences.h",
"smob.h", "genio.h", "eval.h", "chars.h".
* variable.c: Get "variable.h", "smob.h", "genio.h".
* vectors.c: Get "vectors.h", "eq.h".
* version.c: Get "version.h".
* vports.c: Get "vports.h", "fports.h", "chars.h", "eval.h".
* weaks.c: Get "weaks.h".
* fports.h: #include "libguile/ports.h", since you need that in
order to parse this.
| Jim Blandy | 1996-09-10 | 1 | -0/+2 |
* | * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,...continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
feature.h, filesys.h, fports.h, gc.h, gdbint.h, genio.h, gsubr.h,
hash.h, init.h, ioext.h, kw.h, list.h, markers.h, marksweep.h,
mbstrings.h, numbers.h, objprop.h, options.h, pairs.h, ports.h,
posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
vports.h, weaks.h: #include "libguile/__scm.h", not
<libguile/__scm.h>. This allows 'gcc -MM' to determine which
dependencies are within libguile properly.
| Jim Blandy | 1996-09-05 | 1 | -1/+1 |
* | Don't install the unwashed masses of Guile header files in the...main #include path; put most of them in a subdirectory called
'libguile'. This avoids naming conflicts between Guile header
files and system header files (of which there were a few).
* Makefile.in (pkgincludedir): Deleted.
(innerincludedir): New variable; this and $(includedir) are enough.
(INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..".
(installed_h_files): Divide this up. Now this variable lists
those header files which should go into $(includedir) (i.e. appear
directly in the #include path), and ...
(inner_h_files): ... this new variable says which files appear in
a subdirectory, and are referred to as <libguile/mumble.h>.
(h_files): List them both.
(install): Create innerincludedir, not pkgincludedir. Put
the installed_h_files and inner_h_files in their proper places.
(uninstall): Corresponding changes.
* alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h,
ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h,
mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h,
print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
vports.h, weaks.h: Find __scm.h in its new location.
* __scm.h: Find scmconfig.h and tags.h in their new locations
(they're both "inner" files).
| Jim Blandy | 1996-09-04 | 1 | -1/+1 |
* | maintainer changed: was lord, now jimb; first import | Jim Blandy | 1996-07-25 | 1 | -0/+78 |