1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

97 commits

Author SHA1 Message Date
Neil Jerram
72dd0a03e0 * Miscellaneous small doc updates and fixes. 2001-11-13 23:44:29 +00:00
Neil Jerram
9401323e63 * Documentation work. 2001-11-11 15:01:52 +00:00
Thien-Thi Nguyen
a06e3a75b2 Remove "face-lift" comment. 2001-07-09 07:36:48 +00:00
Martin Grabmüller
82893676f4 Make compilation under Windows easier. 2001-06-26 17:53:09 +00:00
Marius Vollmer
92c2555f69 replace "scm_*_t" with "scm_t_*". 2001-06-14 19:50:43 +00:00
Michael Livshin
1be6b49ccb * 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
2001-05-24 00:50:51 +00:00
Marius Vollmer
86d31dfe7d Merge from mvo-vcell-cleanup-1-branch. 2001-05-15 14:57:22 +00:00
Martin Grabmüller
1e6808ea20 Correct, update, improve and clean up a lot of docstrings in order to make
the documentation much more consistent.
2001-04-03 13:19:05 +00:00
Dirk Herrmann
2ade72d773 * Remove uses of SCM_ASSERT that may result in error messages different
from wrong-type-arg errors.
2001-03-06 01:22:37 +00:00
Martin Grabmüller
3b64451459 (scm_seed_to_random_state, scm_copy_random_state, scm_random):
Added texinfo markup.
2001-02-17 11:29:16 +00:00
Martin Grabmüller
64ba8e858c (scm_random, scm_random_normal, scm_random_solid_sphere_x,
scm_random_hollow_sphere_x, scm_random_normal_vector_x,
scm_random_exp): Removed unnecessary "" from docstrings.
2001-02-16 14:55:54 +00:00
Keisuke Nishida
e841c3e0c0 Smob-related creanup. 2000-12-08 17:32:56 +00:00
Dirk Herrmann
34f0f2b8af * Deprecated macros SCM_ROCHARS and SCM_ROUCHARS. 2000-11-22 11:20:03 +00:00
Marius Vollmer
8dc9439fc6 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c,
environments.c, eq.c, error.c, eval.c, evalext.c, feature.c,
filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c,
hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c,
list.c, load.c, macros.c, modules.c, net_db.c, numbers.c,
objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c,
print.c, procprop.c, procs.c, properties.c, ramap.c, random.c,
read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c,
socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c,
strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c,
tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c,
version.c, vports.c, weaks.c: Makes sure the snarfer output
inclusion is disabled when the snarfer is run on the file.  Thanks
to Lars J. Aas!

* Makefile.am: Install guile-procedures.txt in version-specific
directory to enable multiple installed guile versions.  Suggested
by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
2000-11-17 16:25:05 +00:00
Dirk Herrmann
e9bfab50e4 * String comparison functions don't accept symbols as arguments any more.
* Added macro SCM_STRING_COERCE_0TERMINATION_X.
2000-10-26 18:18:28 +00:00
Dirk Herrmann
b7ead2aee2 * Replace calls to SCM_LENGTH. 2000-10-11 14:12:26 +00:00
Dirk Herrmann
2500356c67 * Cleaned up memory error signalling. 2000-06-29 15:54:58 +00:00
Mikael Djurfeldt
f34d19c740 * random.c: #include <string.h>. (Needed by memcpy.) 2000-06-14 01:33:02 +00:00
Dirk Herrmann
eb42e2f03a More distinguished handling of real and complex values. 2000-05-10 12:34:43 +00:00
Dirk Herrmann
f8de44c154 * numbers.c (scm_logtest, scm_division): Reordered dispatch sequence.
* removed calls to deprecated scm_makdbl.
2000-05-02 16:41:20 +00:00
Mikael Djurfeldt
a059974535 * Makefile.am (DEFS): Added. automake adds -I options to DEFS,
and we don't want that.
(INCLUDES): Removed all -I options except for the root source
directory and the root build directory.

* *.*: Change includes so that they always use the "prefixes"
libguile/, qt/, guile-readline/, or libltdl/.
(Thanks to Tim Mooney.)
2000-04-21 14:16:44 +00:00
Mikael Djurfeldt
a401a730c9 Typo 2000-04-13 00:29:22 +00:00
Michael Livshin
89e00824a0 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
indentation style.
2000-03-19 19:01:16 +00:00
Dirk Herrmann
7ab3fdd51f Only include strings.h where it is actually needed. 2000-03-17 18:11:58 +00:00
Dirk Herrmann
003d1fd046 Only include vectors.h in those files, where it is actually needed. 2000-03-17 15:23:03 +00:00
Dirk Herrmann
0fa27efa4a Removed empty file genio.h and references to it. 2000-03-17 13:37:33 +00:00
Mikael Djurfeldt
950cc72b8f * __scm.h eq.c, eval.c, gc.c, hc.h, gh_data, hash.c, numbers.c,
numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
rewrite of handling of real and complex numbers.
(SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
removed along with the support for floats.  (Float vectors are
still supported.)
2000-03-14 06:43:03 +00:00
Greg J. Badros
b6791b2e94 * error.h, error.c: Added `scm_wrong_type_arg_msg' to support
displaying the expected type.  Use SCM_LISTn in a couple places
instead of scm_cons-ing by hand.

* __scm.h: Added SCM_ASSERT_TYPE macro.

* validate.h, scm_validate.h: Added the former, as a renamed
version of the latter with SCM_ASSERT_TYPE used in
SCM_MAKE_VALIDATE (instead of just SCM_ASSERT)

* Makefile.am: Rename scm_validate.h to validate.h.

* *.c, *.h: Include validate.h, not scm_validate.h (old name's
prefix was superfluous).
2000-03-03 00:09:54 +00:00
Greg J. Badros
d928e0b4fb * random.c: Added documentation, from SLIB page:
http://angela.ctrl-c.liu.se/~calle/scheme/slib_toc.html
2000-01-25 21:29:57 +00:00
Greg J. Badros
3b3b36ddb7 * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*
macros and SCM_DEFINE macros to match GNU coding standards.
2000-01-05 19:25:37 +00:00
Greg J. Badros
a1ec69163d *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE. 2000-01-05 19:05:23 +00:00
Greg J. Badros
c751e5e3c3 * guile-snarf.awk.in: Do argument/number mismatch checking and
print warnings in an Emacs compile-mode parseable format.

* struct.c: Use SCM_ASSERT_RANGE instead of SCM_ASSERT w/
SCM_OUTOFRANGE as 3rd argument.

* random.c: Fix argument/number mismatch (that I introduced :-( ).

* __scm.h: Do not #define SCM_ARG* when snarfing;
lets us distinguish between 1 and SCM_ARG1 when snarfing as only
the former (using the number) requires the argument to match the
formal in the current argument snarfing check.

* ramap.c: Remove extraneous #undef FUNC_NAME.
2000-01-05 18:48:07 +00:00
Greg J. Badros
368cf54d89 * unif.c, symbols.c, strings.c, stacks.c, random.c, print.c,
posix.c:  Eliminated a bunch of SCM_NIMP(..)s that are now
redundant with the safer macros.  Patch from Dirk Hermann applied
by hand. Thanks Dirk!

* scm_validate.h: Added SCM_VALIDATE_VECTOR_OR_DVECTOR for some
uses in random.c.

* ramap.c: whitespace change.
2000-01-05 16:16:57 +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
717050c8d5 Remove leading whitespace before empty docstrings. 1999-12-13 00:44:10 +00:00
Greg J. Badros
6b5a304f6b * *.c, scm_validate.h: Use SCM_VALIDATE_NIM, not SCM_VALIDATE_NIMP
(none of the other validate macros have the trailing P).
1999-12-12 18:30:09 +00:00
Greg J. Badros
1bbd0b849f * *.c: Pervasive software-engineering-motivated rewrite of
function headers and argument checking.  Switched SCM_PROC,
SCM_PROC1 macros to be GUILE_PROC, GUILE_PROC1 (may change names
later, but was useful to keep old versions around while migrate)
that has docstrings and argument lists embedded in the GUILE_PROC
macro invocations that expand into a function header.  Use lots of
new SCM_VALIDATE_* macros to simplify error checking and reduce
tons of redundancy.  This is very similar to what I did for Scwm.

Note that none of the extraction of the docstrings, nor software
engineering checks of Scwm is yet added to Guile.  I'll work on
that tomorrow, I expect.

* Makefile.am: Added scm_validate.h to modinclude_HEADERS.

* chars.c: Added docstrings for the primitives defined in here.

* snarf.h:  Added GUILE_PROC, GUILE_PROC1.  Added
SCM_REGISTER_PROC to be like old SCM_PROC, though old SCM_PROC
still remains for now.  Changed naming convention for the s_foo
string name of the primitive to be s_scm_foo for ease of use with
the macro.

* scm_validate.h: Lots of new SCM_VALIDATE macros to simplify
argument checking through guile.  Maybe some of these should be
folded into the header file for the types they check, but for now
it was easiest to just stick them all in one place.
1999-12-12 02:36:16 +00:00
Gary Houston
afe5177e7f * acconfig.h: add HAVE_ARRAYS.
* configure.in: add --disable-arrays option, probably temporary.

	* the following changes allow guile to be built with the array
	"module" omitted.  some of this stuff is just tc7 type support,
	which wouldn't be needed if uniform array types were converted
	to smobs.

	* tag.c (scm_utag_bvect ... scm_utag_cvect): don't define unless
	HAVE_ARRAYS.
	(scm_tag): don't check array types unless HAVE_ARRAYS.

	* sort.c (scm_restricted_vector_sort_x, scm_sorted_p):
	remove the unused array types.
	* (scm_stable_sort, scm_sort): don't support vectors if not
	HAVE_ARRAYS.  a bit excessive.

	* random.c (vector_scale, vector_sum_squares,
	scm_random_solid_sphere_x, scm_random_hollow_sphere_x,
	scm_random_normal_vector_x): don't define unless HAVE_ARRAYS.

	* gh_data.c (makvect, gh_chars2byvect, gh_shorts2svect,
	gh_longs2ivect,	gh_ulongs2uvect, gh_floats2fvect, gh_doubles2dvect,
	gh_uniform_vector_length, gh_uniform_vector_ref):
	don't define unless HAVE_ARRAYS.
	(gh_scm2chars, gh_scm2shorts, gh_scm2longs, gh_scm2floats,
	gh_scm2doubles):
	don't check vector types if not HAVE_ARRAYS.

	* eq.c (scm_equal_p), eval.c (SCM_CEVAL), print.c (scm_iprin1),
	gc.c (scm_gc_mark, scm_gc_sweep), objects.c (scm_class_of):
	don't support the array types unless HAVE_ARRAYS is defined.

	* tags.h: make nine tc7 types conditional on HAVE_ARRAYS.

	* read.c (scm_lreadr): don't check for #* unless HAVE_ARRAYS is
	defined (this should use read-hash-extend).

	* ramap.c, unif.c: don't check whether ARRAYS is defined.

	* vectors.c (scm_vector_set_length_x): moved here from unif.c.  call
	scm_uniform_element_size if HAVE_ARRAYS.
	vectors.h: prototype too.

	* unif.c (scm_uniform_element_size): new procedure.

	* init.c (scm_boot_guile_1): don't call scm_init_ramap or
	scm_init_unif unless HAVE_ARRAYS is defined.

	* __scm.h: don't define ARRAYS.

	* Makefile.am (EXTRA_libguile_la_SOURCES): unif.c and ramap.c
	moved here from	libguile_la_SOURCES.


	* Makefile.am (ice9_sources): add arrays.scm.

	* boot-9.scm: load arrays.scm if 'array is provided.

	* arrays.scm: new file with stuff from boot-9.scm.
1999-11-19 18:16:19 +00:00
Mikael Djurfeldt
9b741bb6da * random.c, random.h (scm_c_default_rstate, scm_c_uniform32):
Added.
Renamed functions in the random function library interface
from scm_i_XXX --> scm_c_XXX.
1999-07-25 19:25:01 +00:00
Mikael Djurfeldt
23a621512f Greg's smob patch 1999-07-07 09:44:01 +00:00
Mikael Djurfeldt
96e263d633 * random.c (scm_i_random_bignum): Made independent of endianness. 1999-01-26 02:27:06 +00:00
Mikael Djurfeldt
7f14609425 Added #include <stdio.h> 1999-01-21 10:41:10 +00:00
Mikael Djurfeldt
5ee11b7cc0 * random.c, random.h (scm_i_make_rstate): New function: Makes
scm_rstate from seed.
(scm_copy_random_state, scm_seed_to_random_state): New functions.
(scm_make_random_state): Removed.
* random.c (scm_make_random_state): Use scm_i_make_rstate().
1999-01-21 09:20:39 +00:00
Mikael Djurfeldt
2a0279c9b8 * random.c: Bugfix: Retrieve and store most significant 32 bits in
different order if the machine is bigendian.
(scm_init_random): Added safety check for bignum digit size.
1999-01-21 02:13:23 +00:00
Mikael Djurfeldt
5a92ddfd5c * random.c: Removed alloca includes. 1999-01-11 07:13:18 +00:00
Mikael Djurfeldt
a7e7ea3e01 Fix 1999-01-10 14:18:33 +00:00
Mikael Djurfeldt
e7a7298668 * random.c, random.h: New files: Random number support.
Interface same as slib's.
1999-01-10 07:57:27 +00:00