1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-07 08:40:21 +02:00
Commit graph

9023 commits

Author SHA1 Message Date
Jim Blandy
5621be9997 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.
* filesys.c (set_element, get_element): This can work on both pipe
and file ports, so use SCM_FPORTP to typecheck, instead of testing
for scm_tc16_fport.
1998-10-09 12:44:37 +00:00
Jim Blandy
74d977c610 * scmconfig.h.in: Regenerated. 1998-10-09 12:44:06 +00:00
Jim Blandy
93016112cb * 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.
1998-10-09 12:43:51 +00:00
Jim Blandy
1ee7c452f7 *** empty log message *** 1998-10-09 12:12:33 +00:00
Jim Blandy
5e9345c384 * configure.in: Call AC_C_INLINE, so we can use inline happily in
libguile.
* configure: Regenerated.
1998-10-09 12:12:26 +00:00
Jim Blandy
1cf84ea500 *** empty log message *** 1998-10-09 11:50:21 +00:00
Jim Blandy
0f88a8f3bd Change the definition of the functions in scm_ptobfuns so that
they get passed the port object, not the port's stream.
* ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
* gc.c (scm_gc_sweep): Pass the port itself to the free function.
* genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
Pass the port itself to the scm_ptobs function.
* ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
scm_generic_fgets): Same.
(putc_void_port, puts_void_port, write_void_port, flush_void_port,
getc_void_port, fgets_void_port, close_void_port): Just change the
argument names; these functions don't really do anything.
* fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
port as an argument, and use SCM_STREAM to get the stdio FILE *.
Also, use prototyped definitions, and get rid of the extra
declarations.
(scm_fptob, scm_pipob): We don't need casts here any more.
* strports.c (prinstpt): Use prototype declarations.
(stputc, stwrite, stputs, stgetc): Take the port as an argument,
and use SCM_STREAM to get the string info.  Also, use prototyped
definitions, and get rid of the extra declarations.
* vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
noop0): Same.
1998-10-09 10:02:41 +00:00
Jim Blandy
ea9fc30d4b Change the definition of the functions in scm_ptobfuns so that
they get passed the port object, not the port's stream.
* ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
* gc.c (scm_gc_sweep): Pass the port itself to the free function.
* genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
Pass the port itself to the scm_ptobs function.
* ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
scm_generic_fgets): Same.
(putc_void_port, puts_void_port, write_void_port, flush_void_port,
getc_void_port, fgets_void_port, close_void_port): Just change the
argument names; these functions don't really do anything.
* fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
port as an argument, and use SCM_STREAM to get the stdio FILE *.
Also, use prototyped definitions, and get rid of the extra
declarations.
(scm_fptob, scm_pipob): We don't need casts here any more.
* strports.c (prinstpt): Use prototype declarations.
(stputc, stwrite, stputs, stgetc): Take the port as an argument,
and use SCM_STREAM to get the string info.  Also, use prototyped
definitions, and get rid of the extra declarations.
* vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
noop0): Same.
* fports.c (local_fgetc, local_fgets): Renamed from scm_fgetc and
scm_fgets, for consistency.
(scm_fptop, scm_pipob): References updated.
1998-10-09 10:01:12 +00:00
Jim Blandy
0c0669cc73 Change the definition of the functions in scm_ptobfuns so that
they get passed the port object, not the port's stream.
* ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
* gc.c (scm_gc_sweep): Pass the port itself to the free function.
* genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
Pass the port itself to the scm_ptobs function.
* ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
scm_generic_fgets): Same.
(putc_void_port, puts_void_port, write_void_port, flush_void_port,
getc_void_port, fgets_void_port, close_void_port): Just change the
argument names; these functions don't really do anything.
* fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
port as an argument, and use SCM_STREAM to get the stdio FILE *.
Also, use prototyped definitions, and get rid of the extra
declarations.
(scm_fptob, scm_pipob): We don't need casts here any more.
* strports.c (prinstpt): Use prototype declarations.
(stputc, stwrite, stputs, stgetc): Take the port as an argument,
and use SCM_STREAM to get the string info.  Also, use prototyped
definitions, and get rid of the extra declarations.
* vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
noop0): Same.
* ports.h (scm_ptobfuns): Replace uses of SCM_P with a straight
prototype; it's okay (preferred, even!) to use ANSI C in Guile.
1998-10-09 10:00:55 +00:00
Jim Blandy
59619fea31 *** empty log message *** 1998-10-08 20:17:46 +00:00
Jim Blandy
79d0b5961d * .cvsignore: New file, containing data-rep.info. I'm not sure
whether we want to check this file into CVS, because it's
generated; if you find compelling reasons it should be, let me
know.
1998-10-08 20:17:38 +00:00
Jim Blandy
cc5ca0281d Adjust formatting. 1998-10-08 20:12:53 +00:00
Jim Blandy
6d921cd6cc *** empty log message *** 1998-10-08 20:12:22 +00:00
Jim Blandy
f64056d105 Include the source location in error messages for scripts.
* init.c (scm_boot_guile_1): Use scm_internal_lazy_catch, so the
stack is still there when we catch the error.
* throw.c (handler_message): If we are handling an error with a
message, then put together the proper arguments and call
scm_display_error, instead of scm_display_error_message.  That
displays source location, if it can find it.
1998-10-08 20:11:59 +00:00
Jim Blandy
a8e0500932 *** empty log message *** 1998-10-07 20:06:29 +00:00
Jim Blandy
dab7f56692 * gc.c (scm_unprotect_object): Change this so that calls to
scm_protect_object and scm_unprotect_object nest properly.
(scm_protect_object): Doc fixes.
1998-10-07 20:05:56 +00:00
Jim Blandy
a14e47910e *** empty log message *** 1998-10-07 20:00:11 +00:00
Jim Blandy
74f8751631 *** empty log message *** 1998-10-07 19:35:56 +00:00
Jim Blandy
3c0a54bd68 *** empty log message *** 1998-10-07 15:52:46 +00:00
Jim Blandy
82637e2bfe * strings.c (scm_string_set_x): Require the argument to be a
writable string, not a substring or a symbol.
* strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates.
1998-10-07 15:52:31 +00:00
Jim Blandy
13af30488e *** empty log message *** 1998-10-07 10:16:28 +00:00
Jim Blandy
d60497159a * configure.in: Don't forget to #define HAVE_RL_GETC_FUNCTION if
we do find the rl_getc_function variable in the readline library;
AC_CHECK_FUNCS used to do this for us, but we're not using it any
more.
* acconfig.h: Add an entry for HAVE_RL_GETC_FUNCTION.
1998-10-07 10:15:57 +00:00
Jim Blandy
f52526ef55 * scmconfig.h.in: Regenerated; ../acconfig.h has changed. 1998-10-07 10:15:44 +00:00
Jim Blandy
6ea669d7b0 *** empty log message *** 1998-10-07 10:03:07 +00:00
Jim Blandy
ca6ef71ad9 * eval.c (safe_setjmp): Remove this misunderstanding.
(ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Replace with references to
ordinary setjmp.
1998-10-07 10:02:34 +00:00
Jim Blandy
402c4d4a74 * configure.in: Don't forget to #define HAVE_RL_GETC_FUNCTION if
we do find the rl_getc_function variable in the readline library;
AC_CHECK_FUNCS used to do this for us, but we're not using it any
more.
1998-10-07 09:57:16 +00:00
Jim Blandy
59027c1838 *** empty log message *** 1998-10-07 09:56:43 +00:00
Jim Blandy
69c8bc066f * configure.in: Properly test for the presence of rl_getc_function;
it's a variable, not a function.
* configure: Regenerated.
1998-10-07 09:09:47 +00:00
Jim Blandy
bd69c3abe5 * configure.in: Properly test for the presence of rl_getc_function;
it's a variable, not a function.
* configure: Regenerated.
1998-10-07 09:02:39 +00:00
Jim Blandy
aee2009bf1 Regenerated, after adding ChangeLog. 1998-10-07 09:02:25 +00:00
Jim Blandy
2f2cef7162 *** empty log message *** 1998-10-07 07:37:40 +00:00
Jim Blandy
21b4d3c2a4 * New directory for documentation.
* README: New file.
* data-rep.texi: It's not a real manual, but it's better than
nothing.
* Makefile.am, Makefile.in, data-rep.info, data-rep.texi,
mdate-sh, stamp-vti, texinfo.tex, version.texi: The usual support
files.
1998-10-07 07:37:17 +00:00
Jim Blandy
c9ea20bcae * doc: New subdirectory.
* Makefile.am (SUBDIRS): List it.
* configure.in (AC_OUTPUT): Build its Makefile.
* configure, Makefile.in: Regenerated.
1998-10-07 07:36:55 +00:00
Jim Blandy
2bb6828503 *** empty log message *** 1998-10-07 07:17:15 +00:00
Jim Blandy
fefec3e0b3 *** empty log message *** 1998-10-06 22:07:55 +00:00
Jim Blandy
4a27613620 * guile-config.in (build-link): It isn't. Revert the change. 1998-10-06 22:07:49 +00:00
Jim Blandy
8aa5c148d1 *** empty log message *** 1998-10-06 22:00:25 +00:00
Jim Blandy
bc08dbdb3a * guile-config.in (build-link): Include a -R flag in the output
from link.  Not sure if this is the right thing to do.
1998-10-06 22:00:13 +00:00
Jim Blandy
8d3ac4c998 * guile.m4 (GUILE_FLAGS): New macro.
* guile.m4 (AM_INIT_GUILE_MODULE): Deleted; it doesn't do anything
terribly helpful any more, nobody's using it, and this is not
really the way I want to handle modules anyway.
1998-10-06 21:59:54 +00:00
Jim Blandy
3e877d1576 Formatting tweaks. 1998-10-06 20:57:10 +00:00
Jim Blandy
2d0937bc84 *** empty log message *** 1998-10-06 15:47:07 +00:00
Jim Blandy
3401653fe0 * libguile.h: Mark these as C declarations, for compilation by C++
compilers.
1998-10-06 15:46:06 +00:00
Jim Blandy
d021129f24 * snarf.h (SCM_PROC, SCM_PROC1): Remove very odd code in #ifdef
__cplusplus clause.  I seriously doubt this ever worked the way
the author seems to have intended.
1998-10-06 13:01:46 +00:00
Jim Blandy
89545eba77 Doc fixes 1998-10-05 21:05:04 +00:00
Jim Blandy
d68fee4833 Utterly needless cleanups to hopelessly messy code.
* ports.c: Doc fixes.
(scm_fflush): Moved to ...
* genio.c (scm_fflush): ... here, amongst all the other port
method invocation functions.
* genio.h, ports.h: The prototype moves too.
1998-10-05 21:04:15 +00:00
Jim Blandy
71f2053493 *** empty log message *** 1998-10-05 19:09:47 +00:00
Jim Blandy
429a44e38f *** empty log message *** 1998-10-05 19:00:15 +00:00
Jim Blandy
817e076966 * guile-config.in (build-compile, help-compile, usage-compile):
New functions to implement new subcommand.
1998-10-05 19:00:07 +00:00
Jim Blandy
6ffeb7a3bd *** empty log message *** 1998-10-05 18:52:39 +00:00
Jim Blandy
204c26b986 * guile-config.in: Redo the help system, so that each subcommand
defines its own usage text, as well as its help text.
1998-10-05 18:52:23 +00:00