summaryrefslogtreecommitdiff
path: root/libguile/unif.c
AgeCommit message (Collapse)AuthorFilesLines
2004-08-12* socket.c, rw.c, deprecated.h, validate.hMarius Vollmer1-11/+11
(SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or scm_to_locale_string, etc. (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as above, plus scm_i_get_substring_spec. * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c, hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c, strorder.c, strports.c, struct.c, symbols.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.
2004-08-06(scm_uniform_vector_ref, scm_array_set_x): For byvect, forceKevin Ryde1-3/+3
signed byte range checks by using scm_to_schar and scm_from_schar, don't want to depend on signedness of C char.
2004-08-03(scm_make_complex): Discouraged by moving to discouraged.h andMarius Vollmer1-7/+9
discouraged.c. Replaced all uses with scm_c_make_rectangular.
2004-08-03* numbers.h. numbers.c (scm_make_ratio): Renamed toMarius Vollmer1-2/+2
scm_i_make_ratio and made static, replaced uses with scm_divide.
2004-08-03(scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):Marius Vollmer1-14/+12
Discouraged by moving to discouraged.h and discouraged.c. Replaced all uses with scm_from_double. (scm_num2float, scm_num2double): Discouraged by moving prototype to discouraged.h and rewriting in terms of scm_to_double. Replaced all uses with scm_to_double.
2004-08-02* numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,Marius Vollmer1-13/+9
scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num, scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long): Discouraged by moving to discouraged.h and discouraged.c and reimplementing in terms of scm_from_* and scm_to_*. Changed all uses to the new scm_from_* and scm_to_* functions.
2004-07-27(scm_array_set_x): For svect, use scm_num2short forKevin Ryde1-1/+2
consistency with other vector types and to get arg and func name into error message.
2004-07-27* tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it intoMarius Vollmer1-12/+12
deprecated.h. Replaced all uses with scm_is_eq.
2004-07-23* deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,Marius Vollmer1-116/+107
SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated versions to deprecated.h and deprecated.c. Changed all uses to either use the SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
2004-07-10* validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,Marius Vollmer1-8/+6
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY, SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF, SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE, SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the fixnum/bignum distinction visible. Changed all uses to scm_to_size_t or similar.
2004-07-08* numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM toMarius Vollmer1-47/+47
SCM_I_MAKINUM and changed all uses.
2004-07-06* deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,Marius Vollmer1-14/+14
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h". Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and scm_is_bool, respectively.
2004-04-24(s_scm_make_uve): Remove unused local variable. Reported byKevin Ryde1-2/+0
Hyperdivision.
2004-02-13* unif.c (scm_make_uve): Removed local variable and simplifiedMikael Djurfeldt1-53/+29
code in order to avoid compiler used uninitialized warnings. * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from scm_hash_map. (scm_hash_fold): Use scm_call_3 directly in the call to scm_internal_hash_fold instead of going via fold_proc (which is now removed). (scm_hash_for_each): Use a trampoline + scm_internal_hash_for_each_handle. (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New functions.
2004-02-11(scm_make_uve, scm_array_p): Allow fraction 1/3 as prototypeKevin Ryde1-4/+25
for dvect. (scm_array_p): Add missing "break"s in switch, fix llvect test look for "l" not "s", fix dvect to be false for singp(prot) since such a value is for fvect. (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
2004-01-10(scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,Kevin Ryde1-17/+54
s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per changes made to scheme-compound.texi.
2004-01-06Add copyright years.Kevin Ryde1-1/+1
2004-01-06(scm_aind): Test SCM_CONSP rather than !SCM_NULLP whileKevin Ryde1-2/+2
traversing the args list, fixes segv if an improper list is given. Reported by Rouben Rostamian.
2003-09-04 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,Dirk Herrmann1-3/+3
SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
2003-04-21 * srfi/srfi-1.c (srfi1_ilength), libguile/list.c (scm_ilength,Dirk Herrmann1-2/+2
scm_last_pair), libguile/unif.c (l2ra): Prefer !SCM_CONSP over SCM_NCONSP. * libguile/unif.c (l2ra): Eliminate redundant check. Now, guile itself does not include any calls to SCM_NCONSP any more.
2003-04-21 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,Dirk Herrmann1-2/+2
scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over SCM_NNULLP. Now, guile itself does not include any calls to SCM_NNULLP any more.
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-36/+12
2003-03-26* unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage ofRob Browning1-18/+22
HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2002-07-202002-07-20 Han-Wen <hanwen@cs.uu.nl>Han-Wen Nienhuys1-17/+18
* *.c: add space after commas everywhere. * *.c: use SCM_VECTOR_SET everywhere, where a vector is written. Document cases where SCM_WRITABLE_VELTS() is used. * vectors.h (SCM_VELTS): prepare for write barrier, and let SCM_VELTS() return a const pointer (SCM_VECTOR_SET): add macro. * autogen.sh (mscripts): find and check version number of autoconf. Complain if 2.53 is not found.
2002-03-14(singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.Marius Vollmer1-1/+1
2002-03-14Retire inclusion guard macro SCM_MAGIC_SNARFER.Thien-Thi Nguyen1-2/+0
2002-03-01Changes in doc/ref:Dirk Herrmann1-5/+5
* api.txt, data-rep.texi: Renamed the struct scm_cell to scm_t_cell. * data-rep.texi: Renamed scm_alloc_cell to scm_cell and scm_alloc_double_cell to scm_double_cell. Changes in libguile: * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL, init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE, SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct scm_cell and all its uses to scm_t_cell in accordance to Guile's naming scheme for types. * alist.c (scm_acons), convert.i.c (CTYPES2UVECT, CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread, scm_spawn_thread), debug.c (scm_make_debugobj), environments.c (scm_make_environment), eval.c (scm_closure), fports.c (scm_fdes_to_port), gc.c (scm_deprecated_newcell, scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell), list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons), ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo), smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport), unif.c (scm_make_uve), variable.c (make_variable), vectors.c (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed scm_alloc_cell to scm_cell. * environments.c (core_environments_observe), gc.c (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object), inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c (FLOAT2NUM), numbers.c (scm_make_real), procs.c (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2, SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable), symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c (allocate_weak_vector): Renamed scm_alloc_double_cell to scm_double_cell.
2002-02-22* Fix a typo that crept in with the scm_X_t to scm_t_X rename.Neil Jerram1-2/+2
* Partial fix for date-week-number bug.
2002-02-11* gc.h, gc.c (scm_gc_sweep): Issue deprecation warning whenMarius Vollmer1-8/+10
non-zero is returned from a port or smob free function. (scm_malloc, scm_realloc, scm_strndup, scm_strdup, scm_gc_register_collectable_memory, scm_gc_unregister_collectable_memory, scm_gc_malloc, scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New. * backtrace.c, continuations.c, convert.i.c, coop-threads.c, debug-malloc.c, dynl.c, environments.c, environments.h, extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c, guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c, ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c, smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c, vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and scm_gc_free/free instead of scm_must_malloc and scm_must_free, as appropriate. Return zero from smob and port free functions. * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL". * fports.c (scm_setvbuf): Reset read buffer to saved values when it is pointing to the putback buffer.
2001-11-25Replaced SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell andMarius Vollmer1-15/+7
scm_alloc_double_cell, respectively.
2001-11-16* Adding C function declarations from the SCM interface to theNeil Jerram1-13/+12
reference manual documentation.
2001-11-11* Documentation work.Neil Jerram1-1/+1
2001-11-02* unif.c (scm_ra2contig): Fixed memory overwrite bug.Mikael Djurfeldt1-1/+1
2001-10-28* unif.c (scm_uniform_array_read_x, scm_uniform_array_write):Mikael Djurfeldt1-5/+9
Don't apply scm_uniform_vector_length on arrays.
2001-07-09Remove "face-lift" comment.Thien-Thi Nguyen1-2/+0
2001-07-03 * posix.c (getlogin): getlogin() implementation for Windows.Martin Grabmüller1-0/+4
* backtrace.c, ioext.c: Include <stdio.h>. * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does exist. * cpp_sig_symbols.in: Added SIGBREAK.
2001-06-30* Fixed a bug in array-set! plus some minor cleanup.Dirk Herrmann1-4/+2
2001-06-28 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,Keisuke Nishida1-1/+2
scm_list_n): New functions. (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated. (lots of files): Use the new functions. * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N. * strings.c: #include "libguile/deprecation.h".
2001-06-26 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,Keisuke Nishida1-2/+2
scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
2001-06-14replace "scm_*_t" with "scm_t_*".Marius Vollmer1-19/+19
2001-06-08* Fixed some bugs, some reported by Matthias Koeppe.Dirk Herrmann1-3/+3
2001-05-27* Changed the default definition of SCM.Dirk Herrmann1-12/+15
* Fixed some typing problems detected by the above change. * Fixed some problems that were detected by compiling guile with -W.
2001-05-26revert the ill-considered part of the 2001-05-24 changesMichael Livshin1-178/+133
2001-05-24 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):Martin Grabmüller1-2/+4
Changed use of scm_array->scm_array_t and scm_array_dim->scm_array_dim_t to enable build with --disable-deprecated.
2001-05-24* validate.hMichael Livshin1-169/+216
(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-04-19* Allow to convert an array of bytes to a list. Thanks to Masao Uebayashi.Dirk Herrmann1-28/+36
2001-04-19* Eliminate some further applications of SCM_C[AD]R to non pair cells.Dirk Herrmann1-3/+3
2001-04-10* Avoid redundant casting of argument numbers to char* and vice versa.Dirk Herrmann1-3/+3
2001-04-03Correct, update, improve and clean up a lot of docstrings in order to makeMartin Grabmüller1-46/+52
the documentation much more consistent.
2001-03-22* Replace function scm_makstr with new function scm_allocate_string.Dirk Herrmann1-1/+1