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

1911 commits

Author SHA1 Message Date
Greg J. Badros
bccab49811 * threads.c, mit-pthreads.c, list.c, coop.c: Remove K&R
prototypes; just use ANSI C prototypes.  I'm not sure how
mit-pthreads.c ever compiled -- it still doesn't for me, but the
normal make procedure does not try to build it anyway (even
--with-threads I get the other threads code building) so I'm not
too worried about it.
1999-12-19 18:24:12 +00:00
Greg J. Badros
3093947745 * tags.h (SCM_CONSP, SCM_NCONSP): Define these in terms of
SCM_SLOPPY_CONSP and SCM_SLOPPY_NCONSP.  (SCM_CONSP) Define this
in terms of SCM_SLOPPY_NCONSP instead of repeating the
expression.

* symbols.h (SCM_SLOPPY_SUBSTRP, SCM_SUBSTRP): Added former, and
define latter in terms of sloppy variant.

* strings.h (SCM_SLOPPY_STRINGP, SCM_STRINGP): Added former, and
define latter in terms of sloppy variant.

* scm_validate.h (SCM_MAKE_VALIDATE): Added this macro to factor
out the commonality of the various basic SCM_VALIDATE_foop
macros. Use SCM_MAKE_VALIDATE macro where possible.  Fix
SCM_VALIDATE_INT_COPY to not use scm_num2ulong -- that does
coercion to an integer which is more advanced than desired and
SCM_NUM2ULONG provides that functionality.  Use SCM_ASSERT_RANGE
appropriately for the various _MIN, _MAX, _RANGE macros.  Drop
some superfluous "SCM_NIMP &&" where possible. Eliminate obsoleted
SCM_VALIDATE_NIMCONS (SCM_VALIDATE_CONS now does the NIMP test as
part of its SCM_CONSP test).

* socket.c, ports.c, pairs.c, list.c, lang.c, async.c: Use
SCM_VALIDATE_CONS, not obsoleted SCM_VALIDATE_NIMCONS.
1999-12-19 01:04:37 +00:00
Greg J. Badros
97b9d8ba4e Ignore guile-snarf.awk (guile-snarf.awk.in is the dist'd file) 1999-12-19 00:20:11 +00:00
Greg J. Badros
7d82e699dc *** empty log message *** 1999-12-18 23:33:44 +00:00
Greg J. Badros
408ea28aeb * dynl.c: Added #include "scm_validate.h" 1999-12-18 23:33:15 +00:00
Greg J. Badros
426b4cde7c Typo fix. 1999-12-18 23:31:22 +00:00
Greg J. Badros
3c3b0e8bd5 *** empty log message *** 1999-12-18 23:24:46 +00:00
Greg J. Badros
4638e08794 * alist.c, chars.c, dynl.c, net_db.c, numbers.c, unif.c: Use
SCM_NUM2ULONG instead of scm_num2ulong; SCM_NUM2LONG instead of
scm_num2long; SCM_WTA instead of scm_wta.  Only done for when
FUNC_NAME was used as an argument of the macro and the formal
argument name was the explicit argument in the old function call.
These were just missed in my first pass of changes.
1999-12-18 23:24:35 +00:00
Mikael Djurfeldt
f334710588 *** empty log message *** 1999-12-18 18:21:55 +00:00
Mikael Djurfeldt
aff882a874 * guile-doc-snarf.in (filename): Strip path to source dir before
touching the .x-files.
1999-12-18 18:21:39 +00:00
Mikael Djurfeldt
f73295a881 *** empty log message *** 1999-12-18 13:42:59 +00:00
Mikael Djurfeldt
f1e1c997b7 * debug.c (scm_reverse_lookup): Bugfix: Reinserted SCM_NIMP. 1999-12-18 13:42:46 +00:00
Mikael Djurfeldt
098f439385 *** empty log message *** 1999-12-18 03:19:18 +00:00
Mikael Djurfeldt
7d2b68a85a * eval.c (SCM_CEVAL): Removed check for unbound slot in
SCM_IM_SLOT_REF.  (This is now handled in a smarter way in GOOPS.)
1999-12-18 03:19:06 +00:00
Mikael Djurfeldt
e1e11745b6 Code layout fixes 1999-12-18 03:18:35 +00:00
Mikael Djurfeldt
d19f1abcb0 *** empty log message *** 1999-12-17 22:36:29 +00:00
Mikael Djurfeldt
76189127e6 * tags.h (SCM_SLOPPY_NCONSP, SCM_SLOPPY_CONSP): New macros.
(SCM_ECONSP): Version which doesn't mix && and || without
parenthesis.
(SCM_NECONSP): Bugfree version.
1999-12-17 22:36:20 +00:00
Greg J. Badros
9fac976eda *** empty log message *** 1999-12-17 20:15:57 +00:00
Greg J. Badros
cfaba30ebd * tags.h (SCM_ECONSP, SCM_NECONSP): Fix these macros to have the
SCM_NIMP test integrated into an || clause that I'd missed before
and was causing a segfault in the regression tests.

* symbols.h (SCM_ROUCHARS): Make cast be to (unsigned char *), not
(char *);  fixes a problem reported by the regression test
ports.test.

* ports.c: Fixed a couple of arg/number mismatches in
SCM_VALIDATE_ macros.

Now passes the (not-comprehensive) guile-modules test-suite again!
1999-12-17 20:11:34 +00:00
Mikael Djurfeldt
f172c0b71d Some code layout fixes 1999-12-17 13:08:46 +00:00
Greg J. Badros
df850562d5 *** empty log message *** 1999-12-16 20:49:31 +00:00
Greg J. Badros
0c95b57d77 * coop-threads.c: Remove K&R function headers.
* scm_validate.h: Added SCM_VALIDATE_THREAD.

* *.c: Remove SCM_NIMP(X) when it is an extraneous pre-test given
that SCM_FOOP macros all now include SCM_NIMP in their expansion.
This simplifies lots of code, making it far more readable.
1999-12-16 20:48:05 +00:00
Greg J. Badros
9c24ff3e6c *** empty log message *** 1999-12-16 03:47:20 +00:00
Greg J. Badros
d3a6bc9484 * *.h: Use SCM_NIMP(X) && in all the FOOP macros.
* *.[ch]: Use do { ... } while (0) idiom in macros that expanded
to a bare block.
1999-12-16 03:46:42 +00:00
Mikael Djurfeldt
5f6d07ad97 Changed unbound slot message 1999-12-14 21:47:42 +00:00
Mikael Djurfeldt
8f151b4264 Completed last change 1999-12-14 21:47:03 +00:00
Mikael Djurfeldt
904f5d528e Fix 1999-12-14 21:28:28 +00:00
Greg J. Badros
5416c39014 *** empty log message *** 1999-12-14 18:55:09 +00:00
Greg J. Badros
9b1594fd19 * snarf.h: Put SCM_PROC and SCM_PROC1 back in for
backward-compatibility of packages that use Guile.  Internally
Guile should not use them, though.  (Maybe enforce this with a new
-DBUILDING_GUILE compile-time flag?).
1999-12-14 18:54:31 +00:00
Greg J. Badros
8496a851e3 *** empty log message *** 1999-12-14 18:16:57 +00:00
Greg J. Badros
dceef6be43 *** empty log message *** 1999-12-14 17:42:51 +00:00
Greg J. Badros
e8e9b690b4 * backtrace.c (scm_set_print_params_x): Renamed from
set_print_params_x.

* guile-doc-snarf.in: Use guile-snarf.awk, not
guile-doc-snarf.awk.  Pass the basename of $filename

* load.h: Added prototypes for scm_sys_library_dir,
scm_sys_site_dir.

* load.c (scm_sys_library_dir, scm_sys_site_dir):  Added these
functions, and took out the old scm_library_dir, scm_site_dir,
scm_pkgdata_dir.  Now the primitives are %package-data-dir
(already existed), %library-dir, and %site-dir.

* debug.c: Use SCM_MISC_ERROR when possible instead of using
s_scm_* in a scm_misc_error() call.

* Makefile.am: Use guile-snarf.awk, not guile-doc-snarf.awk.  Make
using guile-doc-snarf send stdout to $@ to create the .x file like
guile-snarf does.

* guile-snarf.awk.in: Added.
1999-12-14 17:41:59 +00:00
Mikael Djurfeldt
5623a9b459 * guile-doc-snarf.awk: Removed.
* guile-doc-snarf.awk.in: Added.

* ports.c (s_scm_pt_member): Fixed validation.

* guile-doc-snarf.in (filename): Use basename in order to strip
away path.

* debug.c (scm_make_iloc, s_scm_proc_to_mem): Added missing
semicolon.
(scm_memcons, scm_memcons, mem_to_proc): Renamed function name
strings to new form.

* backtrace.c (set_print_params_x): Fixed GUILE_PROC macro.

* tags.h (SCM_UNBOUND): New iflag which is needed for some time to
mark the unboundness of a GOOPS slot.  (Added now in order to
correct a oversight.  Should probably be removed again and
replaced with SCM_UNDEFINED when the corresponding code in GOOPS
is rewritten.)

* print.c (scm_isymnames): Added printed representation for
SCM_UNBOUND.

* eval.c (SCM_CEVAL): Bugfix: Added check for unbound slot in
SCM_IM_SLOT_REF.
1999-12-14 17:08:25 +00:00
Greg J. Badros
93e6656878 *** empty log message *** 1999-12-14 01:24:19 +00:00
Greg J. Badros
ce3769fb6f * strings.c: Fixed mistaken default value in
scm_make_shared_substring; thanks Eric Moore!
1999-12-14 01:23:45 +00:00
Greg J. Badros
d0d595806a *** empty log message *** 1999-12-14 00:29:52 +00:00
Greg J. Badros
fb7641163f * guile-doc-snarf.awk: Use sub instead of gsub in ^ anchored
replacement for docstrings.  Fixes problem Ryan Yeske observed
with using mawk on his system.  Thanks Ryan!
1999-12-14 00:29:42 +00:00
Greg J. Badros
393bbab5ef * guile-doc-snarf.in: Do not echo to stdout since the output now
gets stuck directly in the files instead of redirected from
stdout.

* guile-doc-snarf.awk: Escape a literal ) -- thanks Ryan
Yeske. Use print instead of printf to prime the .x file since
AIX's cpp has problems with #include-ing empty files (according to
the old guile-snarf.in file).
1999-12-13 21:32:37 +00:00
Greg J. Badros
62b8227439 *** empty log message *** 1999-12-13 03:47:14 +00:00
Greg J. Badros
4079f87ed2 * Makefile.am: Fix ETAGS_ARGS to recognize GUILE_PROC,
GUILE_PROC1.  Build guile-procedures.txt, and add that file to
pkgdata_DATA.

* load.c: Added `pkgdata-dir', `site-dir', `library-dir'
primitives.

* guile-doc-snarf.awk: Drop trailing space when no arguments:
e.g., "(foo )" is now "(foo)".

* *.c: moved all the documentation for primitives from
guile-doc/ref/{appendices,posix,scheme}.texi into the source code.
This leaves about half of the primitives undocumented.  Also, all
the markup is currently still texinfo.  I don't have a problem
with texinfo per se, but the markup is not very descriptive or
accurate.
1999-12-13 03:40:23 +00:00
Greg J. Badros
1ae4c71d30 *** empty log message *** 1999-12-13 01:32:24 +00:00
Greg J. Badros
eff08ab65d * scm_validate.h: Drop the SCM_DOCSTRING_SNARF for turning off
SCM_VALIDATE macros;  the SCM_VALIDATE macros should be checked
for argument mismatches (along with the FUNC_NAME macro checking)
by a static tool that runs directly over the .c files.

* snarf.h: Handle SCM_REGISTER_PROC better when snarfing.  The
docstring is still missing from the .doc file;  it just gives the
name of the C function that gets called instead.

* guile-doc-snarf.awk: Be sure to touch the output files to help
make out.  Also handle SCM_REGISTER_PROC better, and change the
output format slightly.
1999-12-13 00:52:43 +00:00
Greg J. Badros
717050c8d5 Remove leading whitespace before empty docstrings. 1999-12-13 00:44:10 +00:00
Greg J. Badros
6aca8c6cbe *** empty log message *** 1999-12-12 23:40:51 +00:00
Greg J. Badros
3dc81fbace * snarf.h: Drop SCM_PROC, SCM_PROC1. Added extra output for
guile-doc-snarf script.

* guile-doc-snarf.in, guile-doc-snarf.awk: New, simple doc
extraction system.  Builds foo.x, foo.doc from foo.{c,cc}.
There are dependencies between these files and snarf.h.  This
replaces guile-snarf.

* guile-snarf.in: Drop everything after $$$ for the new snarf.h
macros.  This is obsoleted by guile-doc-snarf, but kept here for
now for good measure.

* Makefile.am: Added guile-doc-snarf, guile-doc-snarf.awk to
bin_SCRIPTS.  Added .doc to SUFFIXES, and give rule for creating
.doc files to use guile-doc-snarf.  Update the rule for creating
.x files to use guile-doc-snarf.
1999-12-12 23:37:40 +00:00
Greg J. Badros
66c24ad36a Ignore *.doc, guile-doc-snarf 1999-12-12 23:25:57 +00:00
Greg J. Badros
c52f46abf7 *** empty log message *** 1999-12-12 21:25:12 +00:00
Greg J. Badros
6e8d25a695 * *.c: Finish replacing K&R style prototypes with ANSI C
prototypes.

* eval.c: Make scm_m_mody's 3rd argument be a const char *, not a
char *.  ANSI prototypes caught this.

* strorder.c: Use GUILE_PROC1 for the couple SCM_PROC1 expansions
that I missed.

* scm_validate.h: Use SCM_BOOLP for validating bools.  Do not
expand macros if SCM_DOCSTRING_SNARF.
1999-12-12 20:35:02 +00:00
Greg J. Badros
1006486ec2 *** empty log message *** 1999-12-12 19:25:11 +00:00
Greg J. Badros
156dcb091b * *.c, srcprop.h: Use SCM_BOOL(f) instead of (f? SCM_BOOL_T:
SCM_BOOL_F) and use SCM_NEGATE_BOOL(f) instead of (f? SCM_BOOL_F:
SCM_BOOL_T).
1999-12-12 19:24:29 +00:00