| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two-fold benefit. Simplifies code which allocates wchar_t
arrays. Provides overflow check for the multiplication.
* lib.c (chk_wmalloc): New function.
(chk_strdup, mkstring, mkustring, upcase_str, downcase_str,
sub_str, cat_str, trim_str): Use chk_wmalloc.
* lib.h (chk_wmalloc): Declared.
* stream.c (make_string_output_stream): Use chk_wmalloc.
* utf8.c (utf8_dup_from_uc, utf8_dup_from): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Registered flatcar* intrinsic.
* lib.c (lazy_flatcar_scan, lazy_flatcar_func):
New static functions.
(lazy_flatcar): New function.
* lib.h (lazy_flatcar): Declared.
* txr.1: Documented, also touching flatten documentation.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register flatcar intrinsic.
* lib.c (flatcar): New function.
* lib.h (flatcar): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register subtypep and typep.
* eval.h (list_s): Existing variable declared.
* lib.c (atom_s, integer_s, number_s, sequence_s, string_s):
new symbol variables.
(subtypep, typep): New functions.
(obj_init): Initialize new symbol variables.
* lib.c (atom_s, integer_s, number_s, sequence_s, string_s):
Declared.
* txr.1: Documented type hierarchy and the new functions.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (chk_strdup_utf8): New function.
* lib.h (chk_strdup_utf8): Declared.
* linenoise/linenoise.c (chk_strdup_utf8): Declared.
(edit_history_next, linenoise, lino_hist_add): Use
chk_strdup_utf8 instead of strdup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement basic tab completion.
* lib.c (package_alist, package_name, package_symbols): New
functions.
* lib.h (package_alist, package_name, package_symbols):
Declared.
* parser.c (find_matching_syms, provide_completions):
New static functions.
(repl): Register provide_completions as completion callback
with linenoise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Registrations of lisp-parse and read must
account for new optional argument.
* lib.c (func_n5o): New function.
* lib.h (func_n5o): Declared.
* parser.c (lisp_parse): New argument for passing in line number.
This is punched into the parser object.
(read_eval_stream): Call to lisp_parse defaults new argument.
(repl): Pass repl line number to lisp_parse.
* parser.h (lisp_parse): Declaration updated.
* txr.c (txr_main): Call to lisp_parse defaults new argument.
|
|
|
|
|
|
| |
* Makefile (CFLAGS): Remove -iquote $(top_srcdir)mpi
* lib.h: include "mpi/mpi.h" instead of "mpi.h".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register time-struct-local and time-struct-utc
intrinsic funtions.
* lib.c (time_s, year_s, month_s, day_s, hour_s, min_s, sec_s):
New global symbol variables.
(broken_time_struct, time_init): New static functions.
(time_struct_local, time_struct_utc): New functions.
(init): Call time_init.
* lib.h (time_struct_local, time_struct_utc): Declared.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.h (SLOT_CACHE_SIZE): Adjust value from 32 to 8.
(slot_cache_entry_t): New struct typedef.
(slot_cache_line_t): Typedef updated: a cache line
consists of cache line entry structs rather than cnums.
* struct.c (cacheline_lookup, cacheline_insert): New
static functions.
(lookup_slot): Use cacheline_lookup and cacheline_insert.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* args.c (args_cat_zap): New function.
* args.h: (args_cat_zap): Declared.
* eval.c (struct_lit_s): New symbol variable.
(eval_init): Initialize struct_lit_s.
* eval.h (struct_lit_s): Declared.
* gc.c (finalize): If a symbol has a struct slot
hash attached to it, we must free it when
the symbol is reclaimed.
* lib.c (make_sym): Initialize symbol's slot_cache pointer
to null.
(copy): Copy structure objects.
(init): Call struct_init to initialize struct module.
* lib.h (SLOT_CACHE_SIZE): New preprocessor symbol
(slot_cache_line_t, slot_cache_t): New typedefs.
(struct sym): New member, slot_cache.
* lisplib.c (struct_set_entries, struct_instantiate): New
static functions.
(liplib_init): Register new functions in dl_table.
parser.y (HASH_S): New terminal symbol.
(struct): New grammar rule.
(n_expr): Derive struct.
(yybadtoken): Map HASH_S to #S string.
parser.l (grammar): Recognize #S and return HASH_S token.
share/txr/stdlib/place.tl (slot): New defplace.
share/txr/stdlib/struct.tl: New file.
struct.c: New file.
struct.h: New file.
* Makefile (OBJS): Adding struct.o.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Macros called c_* should produce C counterparts of
Lisp val objects, like c_num and c_str.
* lib.h (c_true): Renamed to tnil.
* eval.c (lexical_var_p, lexical_fun_p): c_true to tnil.
* lib.c (less, chr_isalnum, chr_isalnum, chr_isalpha,
chr_isascii, chr_iscntrl, chr_isdigit, chr_isgraph,
chr_islower, chr_isprint, chr_ispunct, chr_isspace,
chr_isblank, chr_isunisp, chr_isupper, chr_isxdigit,
chr_toupper, keywordp): Likewise.
* stream.c (catenated_stream_p): Likewise.
* sysif.c (wifexited, wifsignaled, wcoredump, wifstopped,
wifcontinued): Likewise.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register shuffle as intrinsic.
* lib.c (shuffle): New function.
* lib.h (shuffle): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Function arguments are now allocated on the stack using alloca,
in conjunction with the struct alloc header structure.
The generic_funcall and apply functions are refactored
for this, as are most functions that take variadic arguments.
* args.c (args_add_list, args_cons_list): Functions removed.
(args_normalize, args_normalize_fill): New functions.
(args_get_checked): Draw arguments from list when array runs out.
(args_copy, args_copy_zap): New functions.
* args.h (ARGS_MAX): Reduced to 32.
(ARGS_MIN): New preprocessor symbol.
(args_init): Call args_init_list.
(args_add2, args_add3, args_add4): New inline functions.
(args_more): Take into account list, which may hold additional arguments.
(args_two_more): New inline function.
(args_normalize, args_normalize_fill): Declared.
(args_get_list): Normalize all arguments into one list and return it.
(args_get_rest, args_at, args_atz): New inline functions.
(args_get): Draw arguments from list when array runs out.
(args_clear): New inline function.
* arith.c (maskv): Convert to new args.
* eval.c (APPLY_ARGS): Preprocessor symbol removed.
(bind_args): Converted to accept struct args.
(apply): Function reduced down to trivial adapter which
converts a list of arguments to args, and calls the new
generic_funcall.
(applyv): New static function: struct args wrapper
around apply_intrinsic.
(iapply): Converted to struct args.
(call): Static function removed. The call intrinsic
function binding now goes directly to generic_funcall.
(list_star_intrinsic, interp_fun): Converted to struct args.
(op_catch): Adjustments for bind_args, which requires
a struct args arglist.
(me_op): Must use the new minl and maxl, since minv and maxv
don't take lists any more.
(mapcarv, mappendv, lazy_mapcarv, lazy_mappendv, mapdov,
weavev, or_fun, and_fun, tf, nilf, do_retf, do_apf,
do_ipf, callf, do_mapf, mapf): Converted.
(mapcarl): New function, like the old mapcarv.
(eval_init): call_f initialized from generic_funcall
rather than call. apply registered to applyv rather than
apply_intrinsic. Registrations for zip, hash_from_pairs, vec,
alist-remove, alist-nremove, and throw similarly updated to
new or renamed functions.
* eval.h (interp_fun, mapcarv): Declarations updated.
(mapcarl): Declard.
* hash.c (hashv): Converted to struct args.
(hashl): New function.
(hash_construct): Use hashl, not hashv.
(hash_from_pairs, hash_list, group_by): Converted.
* hash.h (hashv, hash_construct, hash_from_pairs, hash_list,
group_by): Declarations updated.
(hashl): Declared.
* lib.c (appendv, nconcv, lazy_appendv): Converted to
struct args.
(lazy_appendl): New function.
(multi): Converted.
(listv): New function.
(nary_op, plusv, mulv, logandv, logiorv, gtv, ltv, gev, lev,
numeqv, numneqv, maxv, minv): Converted.
(maxl, minl): New functions, like old maxv and minv.
(exptv, gcdv, lcmv, lessv, greaterv, lequalv, gequalv): Converted.
(func_f0v, func_f1v, func_f2v, func_f3v, func_f4v): Converted.
(func_n0v, func_n1v, func_n2v, func_n3v, func_n4v): Converted.
(func_n0v, func_n1v, func_n2v, func_n3v, func_n4v): Converted.
(func_n1ov, func_n2ov, func_n3ov): Converted.
(generic_funcall): Converted to take struct args.
(funcall, funcall1, funcall2, funcall4): Pass stack-allocated
struct args as trailing arguments to variadic functions, and to
generic_funcall.
(do_curry_12_1_v): New struct-args-based static function,
needed to implement curry_12_1_v now.
(curry_12_1_v): Converted.
(transposev): New function based on previous tranpose.
(transpose): Now a wrapper for transposev.
(do_chain, chainv, do_chand, chandv, do_juxt, juxtv,
do_and, andv, do_or, orv, do_not, do_iff): Converted.
(vectorv): New function. Implementation basis for vec intrinsic function.
(alist_removev, alist_nremovev): New functions.
(multi_sort): Switch from mapcarv to mapcarl.
(unique): Converted.
(uniq): Allocate struct args for calling unique.
(obj_init): list_f function now based on new listv, rather than
identity.
* list.h (varg): New typedef.
(struct func): All variadic function pointers converted to use
struct args.
(appendv, nconcv, lazy_appendv, multi, nary_op, plusv, minusv,
mulv, gtv, ltv, gev, lev, numeqv, numneqv, maxv, minv, exptv,
gcdv, lcmv, logadnv, logiorv, maskv, lessv, greaterv, lequalv,
gequalv, func_f0v, func_f1v, func_f2v, func_f3v, func_f4v,
func_n0v, func_n1v, func_n2v, func_n3v, func_n4v, func_n0v,
func_n1v, func_n2v, func_n3v, func_n4v, func_n1ov, func_n2ov,
func_n3ov, generic_funcall, chainv, chandv, juxtv, adnv, orv,
unique): Declarations updated.
(lazy_appendl, listv, maxl, minl, transposev,
vectorv, alist_removev, alist_nremovev): Declared.
* stream.c (make_catenated_stream_v): New function.
(aformat): Renamed to formatv. The recognition of the nil
and t streams (standard output and string) is done here now.
(vformat): Follow rename of aformat to formatv.
(formatv): Function removed. Nobody calls this anymore.
(stream_init): make-catenated-stream re-registered to new
make_catenated_stream_v function.
* stream.h (formatv): Declaration updated.
(make_catenated_v): Declared.
* syslog.c (syslog_init): syslog registred to syslog_wrapv.
(syslog_wrapv): New function based on syslog_wrap converted to struct
args.
(syslog_wrap): Now wrapper for syslog_wrapv.
* syslog.h (syslog_wrapv): Declared.
* unwind.h (uw_throwv): New function.
(uw_throwfv, uw_errorfv): Converted to struct args.
* unwind.h (uw_throwv): Declared.
(uw_throwfv, uw_errorfv): Declarations updated.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register clamp as intrinsic function.
* lib.c (clamp): New function.
* lib.h (clamp): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register display-width intrinsic.
* lib.c (display_width): New function.
* lib.h (display_width): Declared.
* txr.1: Documented display-width.
|
|
|
|
|
|
|
|
| |
* lib.h (struct sym): Remove value member.
* lib.c (make_sym): Don't initialize removed member.
* gc.c (mark_obj): Do not mark removed member.
|
|
|
|
|
|
|
|
| |
* lib.h (static_forward, static_def): New macros
for dealing with C++ static forward declaration problem.
* syslog.c (syslog_strm_ops): Use static
forward macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (fun_k): Global definition removed.
(eval_init): Do not initialize fun_k here.
* filter.c (fun_k): Definition removed.
(filter_init): Do not initialize fun_k.
* filter.h (fun_k): Declaration removed.
* lib.c (fun_k): Defined in this file now.
(obj_init): Initialize fun_k here.
* lib.h (fun_k): Declare here.
|
|
|
|
|
|
|
|
|
| |
* lib.c (system_error_s): New symbol variable.
(obj_init): Initialize new variable.
* lib.h (system_error_s): Declared.
* unwind.c (uw_init): Register system-error exception type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hash.c (hash_print_op): Take third argument,
and call cobj_print_impl rather than cobj_print.
* lib.c (cobj_print_op): Take third argument. The object class is
* printed with obj_print_impl.
(obj_print_impl): Static function becomes extern. Passes its pretty
flag argument to cobj print virtual function.
* lib.h (cobj_ops): print takes third argument.
(cobj_print_op): Declaration updated.
(obj_print_impl): Declared.
* regex.c (regex_print): Takes third argument, and ignores it.
* stream.c (stream_print_op, stdio_stream_print, cat_stream_print):
Take third argument, and ignore it.
* stream.h (stream_print_op): Declaration updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register nthcdr function.
* lib.c (nthcdr): New function.
* lib.h (nthcdr): Declared.
* share/txr/stdlib/place.tl (nthcdr): New defplace.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register second through tenth as intrinsic.
* gencadr.txr: New cadr.c changes encoded.
* lib.c (second, third, fourth, fifth, sixth): Functions
reimplemented using ref, so they are much more efficient
for vectors and strings.
(seventh, eighth, ninth, tenth): New functions.
* lib.h (seventh, eighth, ninth, tenth): Declared.
* share/txr/stdlib/place.tl: place macros defined for
second through tenth.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (split_func): New static function.
(partition_split_common): New static function, based on
on contents of partition function.
(partition): Now a wrapper around partition_split_common.
(split): New function.
* lib.h (split): Documented.
* txr.1: Documented split.
|
|
|
|
|
|
|
| |
* lib.c (nary_op): New function.
(plusv, mulv, logandv, logiorv): Use nary_op.
* lib.h (nary_op): Declared.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The operators set, inc, dec, pop and others are now macros
which generate code, rather than built-in special forms
that use "C magic". Moreover, new such macros are easy to write, and
several new ones are already available. Moreover, new kinds of
assignable places are easy to create.
* place.tl: New file.
* lisplib.c, lisplib.h: New files.
* Makefile (OBJS): New target, lisplib.o.
(GEN_HDRS): New variable.
(LISP_TO_C_STRING): New recipe macro, with rule.
(clean): Remove generated headers named in $(GEN_HDRS).
* eval.c (dec_s, push_s, pop_s, flip_s, del_s): Variables removed.
(setq_s): New variable.
(lookup_var, lokup_sym_lisp_1, lookup_var_l, lookup_fun, lookup_mac,
lookup_symac, lookup_symac_lisp1): Trigger the delayed loading of
libraries for undefined global symbols, and re-try the lookup.
(op_modplace, dwim_loc, force_l): Static functions removed.
(op_setq): New static function.
(eval_init): Initialize setq_s; remove initializations of
removed variables; remove registrations for op_modplace;
add registration for sys:setq, sys:rplaca, sys:rplacd,
sys:dwim-set and sys:dwim-del intrinsics.
Call lisplib_init to initialize the dynamic library loading module.
* lib.c (sys_rplaca, sys_rplacd): New functions, differing
in return value from rplaca and rplacd.
(ref, refset): Handle hash table.
(dwim_set, dwim_del): New functions.
* lib.h (sys_rplaca, sys_rplacd, dwim_set, dwim_del): Declared.
* genvim.txr: Include place.tl in scan.
* tests/010/seq.txr: The del operator test
case no longer throws at run-time but at macro-expansion time, so the
test case is simply removed.
* tests/010/seq.expected: Updated output.
* tests/011/macros-2.txr: Reset *gensym-counter* to zero, because
the textual output of the test case includes gensyms, whose numberings
fluctuate with the content of the new Lisp library material.
* tests/011/macros-2.expected: Updated output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (setenv, unsetenv): Changed static functions to external.
Moved them out of the #if !HAVE_TIMEGM block.
* lib.h (setenv, unsetenv): Declared.
* sysif.c (getenv_wrap, setenv_wrap, unsetenv_wrap): New functions.
(sysif_init): Registered getenv, setenv and unsetenv.
* txr.1: Documented getenv, setenv and unsetenv.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (cobj_ops): New function.
* lib.h (cobj_ops): Declared.
* stream.c (null_ops): Initializer updated.
(struct stdio_handle): New member, err.
(stdio_stream_mark): Mark the err member.
(errno_to_string): New static function.
(stdio_maybe_read_error, stdio_maybe_error): Set persistent error
state. Use errno_to_string_function.
(stdio_put_string, stdio_put_char, stdio_put_byte, stdio_seek,
stdio_get_line): Set errno to zero, so that if the underlying
operations do not set errno on err, we don't misinterpret some pervious
errno value as pertaining to the failed stream operation.
(stdio_get_error, stdio_get_error_str, stdio_clear_error): New static
functions.
(stdio_ops, tail_ops, pipe_ops): Update initializer with new functions.
(string_in_get_error, string_in_get_error_str): New static functions.
(string_in_ops): Update initializer with new functions.
(byte_in_get_error, byte_in_get_error_str): New static functions.
(byte_in_ops): Update initializer with new functions.
(string_out_ops, strlist_out_ops): Update initializer with null
pointers for new functions.
(struct dir_handle): New struct type.
(dir_destroy, dir_mark): New functions.
(dir_get_line): Refactor for struct dir_handle context rather than DIR.
Persist error state.
(dir_close): Refactor for struct dir_handle.
(dir_get_error, dir_get_error_str, dir_clear_error): New static functions.
(dir_ops): Update initializer with new functions.
(make_stdio_stream_common): Initialize new err member.
(make_dir_stream): Refactor for struct dir_handle.
(get_error, get_error_str, clear_error): New functions.
(cat_get_error, cat_get_error_str, cat_clear_error): New static
functions.
(cat_stream_ops): Update initializer with new functions.
(stream_init): Register get-error, get-error-str, clear-error intrinsics.
* stream.h (struct strm_ops): New function pointer members, get_error,
get_error_str and clear_error.
(strm_ops_init): Macro extended with new arguments for new function pointers.
(get_error, get_error_str, clear_error): Declared.
* syslog.c (syslog_strm_ops): Update initializer with null
pointers for new functions.
* txr.1: Documented get-error, get-error-str and clear-error.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register trunc-rem intrinsic.
* lib.h (trunc_rem): Declared.
* txr.1: Documented trunc-rem.
* tl.vim, txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c, arith.h, combi.c, combi.h, debug.c, debug.h, eval.c, eval.h,
filter.c, filter.h, gc.c, gc.h, hash.c, hash.h, lib.c, lib.h,
match.c, match.h, parser.h, rand.c, rand.h, regex.c, regex.h,
signal.c, signal.h, stream.c, stream.h, sysif.c, sysif.h, syslog.c,
syslog.h, txr.c, txr.h, unwind.c, unwind.h, utf8.c, utf8.h:
Update.
* LICENSE, METALICENSE: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* lib.h (cobj_ops_init): New macro.
* hash.c (hash_ops, hash_iter_ops): Initialize with cobj_ops_init.
* rand.c (random_state_ops): Likewise.
* regex.c (char_set_obj_ops, regex_obj_ops): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(sign_extend): New function.
* eval.c (eval_init): Register sign-extend intrinsic.
* lib.h (sign_extend): Declared.
* txr.1: Documented sign-extend.
* tl.vim, txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
|
| |
the dup and flip intrinsics.
* lib.c (do_dup): New static function.
(dupl): New function.
* lib.h (dupl): Declared.
* txr.1: Documented dup and flip.
|
|
|
|
|
|
|
|
|
|
|
| |
(plusp, minusp): New functions.
* eval.c (eval_init): Register plusp and minusp.
* lib.h (plusp, minusp): Declared.
* txr.1: Documented plusp and minusp, and the
handling of characters by zerop.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aligned, affecting OS X port.
* configure: Detect a SIZEOF_WCHAR_T when detecting integer
type that will hold a pointer. In the lit_align test,
if we are on Apple Mac OSX, use a lit_align of 2,
so the logic kicks in for padding literals and handling
misalignment.
* lib.h (litptr): Add a case for LIT_ALIGN < 4 and
SIZEOF_WCHAR_T == 4. In this case we do the arithmetic
on the pointer using short *, and then convert to
wchar_t.
* HACKING: New section 2.4.3 about new wchar_t hack.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (unique): New function.
(uniq): Becomes wrapper around unique.
* lib.h (unique): Declared.
* txr.1: Documented unique, and equivalence between uniq and unique.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
| |
* lib.h (func_n1ov, func_n2ov, func_n3ov): Declared.
|
|
|
|
| |
* lib.h (func_n0o): Declaration removed.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (in): New function.
* lib.h (in): Declared.
* txr.1: Documented in.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (lequal, gequal, lequalv, gequalv): New functions.
* lib.h (lequal, gequal, lequalv, gequalv): Declared.
* txr.1: Documented lequal and gequal.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
the lessv and greaterv functions instead of less and greater.
* lib.c (lessv, greaterv): New functions.
* lib.h (lessv, greaterv): Declared.
* txr.1: Document variadic nature of less and greater.
|
|
|
|
|
|
|
|
| |
* lib.c (sort_group): New function.
* lib.h (sort_group): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Registered wrap and wrap* intrinsics.
* lib.h (wrap_star, wrap): Declared.
* txr.1: wrap and wrap* documented.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register new functions as intrinsics.
* lib.h (succ, ssucc, sssucc, pred, ppred, pppred): Declared.
* txr.1: Documented.
|
|
|
|
|
|
| |
* lib.h (where): Declaration updated.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
for generic semantics.
* lib.h (max2, min2): Parameter names changed to avoid suggesting
that the operands are numbers.
* txr.1: Documentation for min and max updated.
|
|
|
|
|
|
|
|
|
| |
* lib.c (do_chand): New static function.
(chandv): New function.
* lib.h (chandv): Declared.
* txr.1: Documented chand.
|
|
|
|
|
|
|
|
|
| |
(string_extend): Use chk_grow_vec.
(vec_set_length): Avoid subtractions for comparing numbers.
* lib.h (chk_grow_vec): Declared.
* stream.c (snarf_line, string_out_put_string): Use chk_grow_vec.
|
|
|
|
|
|
|
| |
(throw_mismatch): New function.
* lib.h (throw_mismatch): Declared.
(type_mismatch): Declaration turned into inline function.
|