| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This is the fifth round of an effort to enable GCC's -Wextra
option.
* signal.h (sig_save_enable, sig_save_disable): Fix the
compiler warning about do ; while (0) benefiting from
braces around the empty statement. I agree with this;
I was momentarily confused myself by that semicolon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the fourth round of an effort to enable GCC's -Wextra
option. Instances of code that test whether an unsigned
quantity is negative are repaired. Real bugs are found.
* itypes.c (c_u32, c_uint, c_ulong): Remove useless comparison
for < 0 that was copy-pasted from the signed cases.
* linenoise/linenoise.c (show_help, edit): Do not test the
return value of the getch_fn callback for negative. It returns
wint_t, which may be unsigned. Test for the WEOF value.
This is a bug because since the original comparison is
always false, the code fails to catch the WEOF return.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the third round of an effort to enable GCC's -Wextra
option. Instances of signed/unsigned mismatch between
the branches of ternary conditionals are addressed.
* ffi.c (pad_retval): Add cast into the consequent of
the conditional so it yields size_t, like the alternative.
* lib.c (split_str_keep): Likewise.
(vector): Cast -1 to ucnum so it has the same type as the
alloc_plus opposite to it.
* parser.c (lino_getch): Add a cast to wint_t to match
return value and opposite WEOF operand.
* stream.c (generic_get_line): Likewise.
* sysif.c (c_time): Convert both consequent and alternative
to time_t to silence warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the second round of an effort to enable GCC's -Wextra
option. All function parameters that are unused and
are removable are removed. They are eliminated from the
function defintions, declarations, callers, and any related
function pointer variables or structure members.
* arith.c (nary_simple_op): Remove unused self parameter.
See lib.c: maxv, minv.
* chksum.c (crc32_buf, crc32_str): Remove unused self
parameter.
(crc32): Don't pass self to the above functions.
* eval.c (copy_env_handler, copy_bh_env_handler): Remove
unused parent parameter. See unwind.c.
(supplement_op_syms): Remove unused max parameter.
(me_op): Don't pass max to supplement_op_syms.
* lib.c (seq_iter_rewind): Remove unused self parameter.
(lazy_flatten_func): Remove unused env parameter.
(lazy_flatten): Use func_n1 to create non-environment-carrying
funtion out of lazy_flatten_func.
(maxv, minv): Don't pass self parameter to nary_simple_op.
(middle_pivot): Remove unused lessfun param.
(quicksort): Don't pass lessfun to middle_pivot.
(diff, isec): Don't pass self to seq_iter_rewind.
* lib.h (seq_iter_rewind, nary_simple_op): Declarations
updated.
* struct.c (get_super_slots): Remove unused self parameteer.
(make_struct_type): Don't pass self to get_super_slots.
* sysif.c (flock_unpack): Remove unused self parameter.
(fcntl_wrap): Don't pass self to flock_unpack.
* unwind.c (uw_push_cont_copy): Remove parent parameter from
function pointer parameter. See eval.c: copy_env_handler.
(call_copy_handlers): Remove parent parameter and don't
pass that argument to the indirect call via pointer
to the copy handler function.
(revive_cont, capture_cont): Don't pass 0 value to
removed parent parameter of call_copy_handlers.
* unwind.h (struct uw_cont_copy): Function pointer member copy
loses parent parameter.
(uw_push_cont_copy): Declaration updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first round of an effort to enable GCC's -Wextra
option. All function parameters that are unused an that we
cannot eliminate are treated with a cast to void in the
function body.
* args.c (args_key_check_store): Cast unused param to void.
* combi.c (perm_list_gen_fill): Likewise.
* eval.c (op_error, op_meta_error, op_quote op_qquote_error,
op_unquote_error, op_load_time_lit, me_each, me_for,
me_quasilist, me_flet_labels, hash_min_max, me_ignerr,
me_whilet, me_iflet_whenlet, me_dotimes, me_mlet,
me_load_time, me_load_for): Likewise.
* ffi.c (ffi_void_put, ffi_fixed_dynsize, *ffi_fixed_alloc,
ffi_noop_free, ffi_void_get, ffi_simple_release, ffi_i8_put,
ffi_i8_get, ffi_u8_put, ffi_u8_get, ffi_i16_put, ffi_i16_get,
ffi_u16_put, ffi_u16_get, ffi_i32_put, ffi_i32_get,
ffi_u32_put, ffi_u32_get, ffi_i64_put, ffi_i64_get,
ffi_u64_put, ffi_u64_get, ffi_char_put, ffi_char_get,
ffi_uchar_put, ffi_uchar_get, ffi_bchar_get, ffi_short_put,
ffi_short_get, ffi_ushort_put, ffi_ushort_get, ffi_int_put,
ffi_int_get, ffi_uint_put, ffi_uint_get, ffi_long_put,
ffi_long_get, ffi_ulong_put, ffi_ulong_get, ffi_float_put,
ffi_float_get, ffi_double_put, ffi_double_get, ffi_val_put,
ffi_val_get, ffi_be_i16_put, ffi_be_i16_get, ffi_be_u16_put,
ffi_be_u16_get, ffi_le_i16_put, ffi_le_i16_get,
ffi_le_u16_put, ffi_le_u16_get, ffi_be_i32_put,
ffi_be_i32_get, ffi_be_u32_put, ffi_be_u32_get,
ffi_le_i32_put, ffi_le_i32_get, ffi_le_u32_put,
ffi_le_u32_get, ffi_be_i64_put, ffi_be_i64_get,
ffi_be_u64_put, ffi_be_u64_get, ffi_le_i64_put,
ffi_le_i64_get, ffi_le_u64_put, ffi_le_u64_get, ffi_wchar_put,
ffi_wchar_get, ffi_sbit_get, ffi_ubit_get, ffi_cptr_get,
ffi_str_in, ffi_str_put, ffi_str_get, ffi_str_d_get,
ffi_wstr_in, ffi_wstr_get, ffi_wstr_put, ffi_wstr_d_get,
ffi_bstr_in, ffi_bstr_put, ffi_bstr_get, ffi_bstr_d_get,
ffi_buf_in, ffi_buf_put, ffi_buf_get, ffi_buf_d_in,
ffi_buf_d_put, ffi_buf_d_get, ffi_closure_put, ffi_ptr_in_in,
ffi_ptr_in_d_in, ffi_ptr_in_out, ffi_ptr_out_in,
ffi_ptr_out_out, ffi_ptr_out_null_put, ffi_ptr_out_s_in,
ffi_flex_struct_in, ffi_carray_get, ffi_union_get,
make_ffi_type_builtin, make_ffi_type_array,
ffi_closure_dispatch, ffi_closure_dispatch_safe): Likewise.
* gc.c (cobj_destroy_stub_op, cobj_destroy_free_op, cobj_mark_op): Likewise.
* lib.c (seq_iter_get_nil, seq_iter_peek_nil): Likewise.
* linenoise/linenoise.c (sigwinch_handler): Likewise.
* parser.c (repl_intr, read_eval_ret_last, repl_warning,
is_balanced_line): Likewise.
* parser.y (yydebug_onoff): Likewise.
* socket.c (dgram_close): Likewise.
* stream.c (unimpl_put_string, unimpl_put_char,
unimpl_put_byte, unimpl_unget_char, unimpl_unget_byte,
unimpl_put_buf, unimpl_fill_buf, unimpl_seek, unimpl_truncate,
unimpl_set_sock_peer, null_put_string, null_put_char,
null_put_byte, null_get_line, null_get_char, null_get_byte,
null_close, null_flush, null_seek, null_set_prop,
null_get_error, null_get_error_str, null_clear_error,
null_get_fd, dir_close): Likewise.
* struct.c (struct_type_print): Likewise.
* unwind.c (me_defex): Likewise.
|
|
|
|
| |
* tags.tl (process-form): Handle top-level macro-time form.
|
|
|
|
|
|
| |
* tags.tl (process-form): Use mappend for the recursive
processing, not mapdo, and invoke pend on the result
to add it to the accumulated list.
|
|
|
|
|
|
| |
* tags.tl (process-package-influencing-form): When a load-for
is encountered, only descend into fake-load if the clause
kind is pkg, and the package doesn't exist.
|
|
|
|
|
|
|
| |
* tags.tl (in-anon-package): Take advantage of the system
function sys:make-anon-package which is used in the
file compiler, instead of creating a package named "anon"
which could plausibly clash with an existing package.
|
|
|
|
|
|
|
|
| |
* tags.tl (in-anon-package): Instead of the unwind-protect
which deletes the anonymous package, let us save and restore
the *package-alist* by dynamically binding it to its current
value. This will roll back packages that were created by
fake-load.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tags.tl (*fake-load-path*): New special variable.
(process-package-influencing-form, fake-load): New functions.
(process-form): Pass each compound form to
process-package-influencing-form in case it might be a
defpackage or load.
(collect-tags-tl): Bind *fake-load-path* to the file's path
so fake-load will resolve relative paths relative to the
file's own directory, similarly to how load works with
*load-path*.
|
|
|
|
|
|
|
|
|
|
| |
Let's process each file in an anonymous package, saving and
restoring the *package* special. TXR files can mess with that
variable.
* tags.tl (in-anon-package): New macro.
(collect-tags-tl, collect-tags-txr): Wrap parsing with
in-anon-package macro.
|
|
|
|
|
| |
* tags.tl (process-clause): Bugfix: flatcar must be used, not
flatten, because the bindings can contain dotted notation.
|
|
|
|
|
|
|
|
|
|
|
| |
* tags.tl (unexpand): New function.
(process-clause): Walk the forms enclosed in a @(do ...)
directive that appears at the top level. Because all Lisp is
macro-expanded right inside the TXR parser, we need to
"unexpand" the forms by chasing their macro-ancestor
chain, gaining access to the original forms like defun
and defstruct. We can then turn these forms into tags using
the process-form function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handles only top-level define and bind.
* tags.tl (with-tag-shorthand-macro): New macro: a robot for
writing the the shorthand macrolet in collect-tags, so we can reuse it.
(process-form): New function, made from the bulk of
collect-tags.
(collect-tags): Renamed to collect-tags-tl. The macrolet is
replaced by invocation of with-tag-shorthand macro and the
form case processing logic by a call to process-form.
(process-clause, collect-tags-txr, collect-tags-guess): New
functions.
(toplevel): Help text updated. Process .txr files through
collect-tags-txr. Also process unsuffixed files, if they are
explicity mentioned on the command line, through
collect-tags-guess, which looks for hash-bang lines containing
the --lisp option.
|
|
|
|
|
|
|
| |
* tags.tl (escape): Vim is failing to find tag entries when
the search patterns are lines containing backslashes.
Backslash must be added to the list of characters needing
escaping in tag patterns.
|
|
|
|
|
|
|
|
|
|
|
|
| |
txr-parse provides a way for Lisp code to programmatically
parse the TXR language and obtain the Lisp represenation.
This has hitherto not been available.
* eval.c (eval_init): Register txr-parse intrinsic.
* parser.c (txr_parse): New function.
* parser.h (txr_parse): Declared.
|
|
|
|
|
|
|
|
|
|
| |
* linenoise.c (edit): Handle Ctrl-F in extended mode so that
Ctrl-X Ctrl-F forces the line to be submitted without a
balance check.
* txr.1: Document previously undocumented balance check,
including the flashing exclamation mark. Document Ctrl-X
Ctrl-F.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent commit 7c40d5d6ef6832baed4a5ccd0a5d4235ed4f5ee3
states that the documentation has been updated. However,
it contains no changes to txr.1 at all. I swear I made
the changes, but they somehow disappeared. They are not
in my reflog or stash or any file in the filesystem. Gone!
Here, I reproduce those changes, with some additional
improvements and fixes.
* txr.1: Rewrite the description of Ctrl-D. Document the new
effect that major deletion operations all copy into the
clipboard. Fix "It's" typo that should be "Its".
|
|
|
|
|
|
|
|
|
| |
* configure: When generating the assignment that stores the
value of the command line variable into the corresponding
shell variable, interpolate $val between single quotes in such
a way that single quotes occurring in $val are replaced by the
pattern '\''. Thus, variables may contain any character
whatsoever.
|
|
|
|
|
|
|
| |
* configure (cplusplus): New variable.
Check ccname and cc for signs of C++; if so, set the new
variable to 'y'. If the variable is set, then filter
C-specific options out of diag_flags.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
* protsym.c: Regenerated.
|
|
|
|
| |
* txr.1: List tnode and tree types in typeof description.
|
|
|
|
|
|
|
| |
TXR 228, which introduced open-subprocess, broke open-process.
* stream.c (open_process): Pass args correctly as the fourth
argument of open_subprocess, rather than the third.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Harmonizes with starts-with and ends-with.
* eval.c (eval_init): Register contains intrinsic.
* lib.c (contains): New function.
* lib.h (contains): Delared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
| |
* struct.c (method_args_fun): env parameter is now a dynamic
args object. Code adjusted accordingly.
(method): Duplicate args into a dyn_args object instead of
a list. Because a dyn_args has a car and cdr field, we
can eliminate the two conse as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* args.c (args_cat): New function.
* args.h (args_cat): Declared.
* struct.c (umethod_args_fun): env parameter is now a dynamic
args object. Code adjusted accordingly.
(umethod): Duplicate the args into a dynamic args object
instead of consing up a list and also eliminate the temporary
cons since we can pass the additional argument using the car
field of the dynamic args.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The apf and ipf functions now take arguments in addition to
the function that is being wrapped. If specified, these
arguments are inserted to the left the applied arguments.
* eval.c (do_args_apf, do_args_ipf): New static functions.
(apf, ipf): Use do_args_apf and do_args_ipf, respectively,
for handling the case when arguments are present.
Passing the stored arguments is done with the help of the new
DARG type, instead of consing up a list.
* txr.1: Documented new arguments of apf and ipf.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An object of args type captures into the heap the "struct
args" argument list that normally appears only on the stack.
Such an object also has space for a car and cdr field,
which can come in handy.
* args.c (dyn_args): New function: hoist a struct args *
into an args heap object.
* args.h (dyn_args): Declared.
* gc.c (finalize, mark_obj): Handle DARGS type code.
* hash.c (equal_hash): Handle DARG via eq equivalence.
* lib.c (args_s): New symbol variable.
(code2type): Map DARG to args symbol.
(equal): Handle DARG type, using eq equivalence for now.
(obj_init): Initialize args_s with interned symbol.
* lib.h (enum type, type_t): New type code, DARG.
(struct dyn_args): New struct.
(union obj): New member, a of type struct dyn_args.
* txr.1: Documented args type under typeof.
|
|
|
|
|
| |
* share/txr/stdlib/compiler.tl (dump-compiled-objects):
Fixed incorrect value of self variable.
|
|
|
|
|
|
|
|
|
|
|
| |
* hash.c (hash_uni): New functional argument map1fun and
map2fun. If present, values from hash1 and hash2,
respectively, are projected through these functions.
(hash_init): hash-uni registration updated.
* hash.h (hash_uni): Declaration updated.
* txr.1: Documented new arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (yank): New static function, made out
of yank_sel.
(yank_by_ptr): New static function.
(yank_sel): Now wrapper for yank.
(edit_delete): Call yank_sel here if selmode is on, rather
than having the caller do it. This fixes a bug: the Ctrl-D
handler was doing this, but not the Del key handler.
(edit_delete, edit_delete_prev_all, edit_delete_to_eol,
edit_delete_line): All these operations
now yank the deleted text into the clipboard.
(edit_delete_prev_word): Likewise, and bugfix here: undo was
not being recorded for the clipboard deletion, only for the
word deletion. The semantics here is that if a selection is in
effect, only the selection goes into the clipboard, not the
word.now the deleted selection goes into the clipbo
(edit): Ctrl-D handler now doesn't call yank_sel, relying on
edit_delete to do it.
* txr.1: Documentation updated.
|
|
|
|
|
|
|
|
|
|
|
| |
* configure (small_mem): New variable. Provide help text and
show default value of --small-mem option. Generate
CONFIG_SMALL_MEM in config.h.
* gc.c (HEAP_SIZE, CHECKOBJ_VEC_SIZE, MUTOBJ_VEC_SIZE,
FULL_GC_INTERVAL, FRESHOBJ_VEC_SIZE, DFL_MALLOC_DELTA_THRESH):
Define conservative values of these constants if
CONFIG_SMALL_MEM is in effect.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The various curry_xx_yy functions perform partial application,
not currying. The curry prefix is being renamed to pa
(partially apply).
* lib.c (remq_lazy, remql_lazy, remqual_lazy, tree_Find):
Updated.
(do_curry_12_1, do_curry_12_1_v, do_curry_12_2,
do_curry_123_1, do_curry_123_23, do_curry_123_2,
do_curry_123_3, do_curry_1234_1, do_curry_1234_34):
Renamed to do_pa_12_1, do_pa_12_1_v, do_pa_12_2, do_pa_123_1,
do_pa_123_23, do_pa_123_2, do_pa_123_3, do_pa_1234_1,
do_pa_1234_34.
(curry_12_1, curry_12_1_v, curry_12_2, curry_123_1,
curry_123_23, curry_123_2, curry_123_3, curry_1234_1,
curry_1234_34): Renamed to pa_12_1, pa_12_1_v, pa_12_2,
pa_123_1, pa_123_23, pa_123_2, pa_123_3, pa_1234_1,
pa_1234_34.
(transposev, do_juxt): Updated.
* lib.h: Declarations renamed.
* eval.c (subst_vars, qquote_init, expand_catch, weavev):
Updated.
* filter.c (get_filter, build_filter_from_list,
filter_string_tree, filter_init): Updated.
* match.c (tx_subst_vars, do_txeval, v_freeform, v_bind,
v_throw, v_deffilter, v_assert, h_assert): Updated.
* parser.y (gather_clause): Updated.
* regex.c (regex_range_full_fun, regex_range_left_fun,
regex_range_right_fun, regex_range_search_fun): Updated.
* stream.c (open_files, open_files_star): Updated.
* txr.c (txr_main): Updated.
* unwind.c (me_defex): Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* filter.c (tobase64url_k, frombase64url_k): New keyword
symbols variables.
(base64_stream_enc_impl): New static function, derived from
base64_stream_enc.
(base64_stream_enc): Now a wrapper for base64_stream_enc_impl.
(base64url_stream_enc, base64url_encode): New functions.
(base64_stream_dec_impl): New static function, derived from
base64_stream_dec.
(base64-stream_dec): Now a wrapper for base64_stream_dec_impl.
(get_base64_url_char, b64url_code): New static functions.
(base64url_stream_dec, base64_url_decode,
base64url_decode_buf): New functions.
(filter_init): Intern new keyword symbols, initializing the
corresponding variables, register new :frombase64url
and :tobase64url filters and intrinsic functions
base64url-stream-enc, base64url-stream-dec, base64url-encode,
base64url-decode and base64url-decode-buf.
* filter.h (base64url_stream_enc, base64url_stream_dec,
base64url_encode, base64url_decode, base64url_decode_buf):
Declared.
* txr.1: Documented.
|
|
|
|
|
| |
* txr.tl (toplevel): In the usage output, a few quasiliterals
should just be literals since nothing is interpolated.
|
|
|
|
|
|
|
|
| |
* tags.tl (toplevel): We need to push directories into the
skiplist when we don't have FTW_ACTIONRETVAL, indicated by
ftw-actionretval being zero. If ftw-actionretval is nonzero,
so is ftw-skip-subtree, which completely takes care of the
skipping of subdirectories.
|
|
|
|
|
| |
* tags.tl (static-when): Macro must explicitly reduce
expression to its value.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/compiler.tl (propagate-perms): New
function.
(compile-file-conditionally): If the source file is a hash
bang script, then call propagate-perms just before closing
the streams.
* txr.1: Documented the permission propagation.
|
|
|
|
|
| |
* tags.tl (toplevel): Wrap in compile-only so compiler doesn't
execute it.
|
|
|
|
|
|
|
|
|
|
| |
* tags.tl (collect-tags): Snarf the file as a string from
which we can make a string byte input stream suitable for
parsing. Having that string, we can handle hash bang by
detecting it and commenting it out with a semicolon. We obtain
the lines by splitting the string. When calling read, we
pass the path as the name argument, so error messages still
use the correct file name.
|
|
|
|
|
|
| |
* hash.c (do_weak_tables): Update the count field of each weak
hash to account for the entries that get removed by expiry.
Also, loop variable moves into a tighter scope.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inequality comparisons of strings and symbols are broken due
to assuming that cmp_str returns -1 or 1. cmp_str uses the C
library function wscsmp, and is exposed as the Lisp function
cmp-str. That is correctly documented as returning a negative
or positive value. But a few function in lib.c assume
otherwise.
On newer glibc's, at least on x86, it seems that wcscmp
does return 1, 0 or -1 consistently; perhaps the newer
optimized assembly routines are ensuring this. It shows
up on older glibc installations where the C version just
returns the difference between the mismatching characters.
* lib.c (cmp_str): Now returns -1, 0 or 1.
* txr.1: Specify the stronger requirements on the cmp-str
return value, adding a note that older versions conform
to a weaker requirement.
|
|
|
|
|
|
|
|
|
|
|
| |
* genvim (iskeyword): Remove the : character from being a
symbol constituent. This doesn't work well with tags, which
are oblivious to packages. We would not only have to make
tags.tl deal with packages, but in the tags file we would have
to duplicate every entry with and without the package prefix.
It doesn't make a lot of sense. Plus, packages themselves
are tags, and if we put the cursor on the package part of a
qualified symbol, we can jump to the package.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tags.tl (tags-opts): Cumulative exlude option added.
(ftw-actionretval, ftw-continue, ftw-skip-subtree): These
variables are missing if we are not on Glibc, so we define
them as zero. These definitions help us take advantage of
FTW_ACTIONRETVAL to skip recursing into exluded subtrees.
(static-when): New macro.
(toplevel): Implement exclude option. Skipping directories on
platforms whose nftw function doesn't have FTW_ACTIONRETVAL is
simulated by keeping a dynamic skip list, which is
intelligently purged to keep it short.
|
|
|
|
|
| |
* sysif.c (sysif_init): Fix misspelled FNM_EXTMATCH in #ifdef
causing registration of fnm-extmatch being excluded.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An option declared as (cumul <type>) indicates that it is of
type <type>, and that multiple occurrences of the option
produce values that are accumulated into a list.
The accumulation is in reverse order: the rightmost
occurrence ends up the first in the list.
* lisplib.c (getopts_set_entries): Add cumul to list of
interned symbols, so that the getopts.tl code isn't mistakenly
working with sys:cumul.
* share/txr/stdlib/getopts.tl (opt-parsed): New slot, cumul.
(opt-desc basic-type p, opt-desc list-type-p, opt-desc
cumul-type-p): New methods.
(opt-desc check): Rework type validity check using the new
methods.
(opt-parsed convert-type): Support 'cumul type by
instantiating an opt-parsed object for the wrapped type,
and stealing its converted argument into the current object,
and setting the cumul flag.
(opts add-opt, option-base add-opt): Support options that have
the cumul flag set by accumulating list values. The code is
different due to different amounts of encapsulation. The opts
structure stores the raw opt-parsed objects, whereas
option-base just takes the decoded values.
(opthelp): Parse through the (cumul ...) type syntax, so
cumulative options are printed in the help text the same way
as if they were non-cumulative.
* txr.1: Documented.
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/getopts.tl
(sys:opt-processor parse-shorts): There is a scoping mixup
here with the opts argument shadowed by a same-named
lexical variable, causing a referential mixup.
Also fixed bad indentation.
|
|
|
|
|
|
|
|
| |
* tags.tl (collect-tags): In proccessing a
define-option-struct, don't record a tag for a
long or short option that is nil. Each option definition
defines only one slot. If both a long and short option are
present (non-nil), then the long option names the slot.
|