| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
shadowing symbol macro.
* tests/011/macros-1.expected: Updated.
|
|
|
|
|
| |
Cautiously, we use fprintf rather than our streams system, in case some
problem with the streams is involved in this mess.
|
|
|
|
| |
exception in early initialization message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One upshot of all this is that (throw 'foo "msg") now
does exactly the same thing as (throwf 'foo "msg").
A message-only exception really is a one-string exception argument
list ("message ..."), like the documentation says.
* unwind.h (struct uw_catch): exception member renamed to args.
(uw_catch): Macro follows structure member rename.
* eval.c (op_catch): Removed now unnecessary kludge of turning non-list
exception argument list into a one-element argument list.
* match.c (v_try): Similar hack to the one in op_catch
removed here.
* unwind.c (uw_unwind_to_exit_point, uw_push_catch): Follows rename of
exception member.
(uw_throw): The exception parameter is renamed to args. The kludge
removed from op_catch re-appears here, because numerous calls
to uw_throw just pass a string as args. It's less of a kludge here
because this is the master entry point to exception processing,
and it straightens out the representation right away.
The exception arguments or message are printed in a clearer way.
|
|
|
|
|
|
|
|
|
|
|
| |
the handling of missing meta-numbers (for
instance (op ... @1 .. @3): 1 and 3 occur, but not 2.
* eval.c (supplement_op_syms): Bugfix: loop was testing
and updating the wrong variable, causing it to be looking at the first
element of the syms list in every iteration.
Not a regression: this was implemented wrong when the function
was introduced on October 6, 2013.
|
|
|
|
|
|
|
|
|
|
|
| |
occurs in the quasi syntax (which is the result of substitution
of metanums like @1 by the op macro), if that variable
evaluated to a list form, it was not being converted to
a string. The resulting form was then examined for variable
substitutions as if it were part of the quasi syntax.
This was introduced at the same time as the feature of being
able to use metanums in a quasiliteral (Feb 13, 2012:
last change before Version 57).
|
|
|
|
|
|
|
| |
like @1, @2, preserve the (sys:var X args ..) structure
if there are args (but of course with X replaced by the appropriate
gensym). This allows syntax like `@{1 10}` to work in quasiliterals: in
other words, modifiers on interpolated metas, on par with @{a 10}.
|
|
|
|
|
|
|
|
|
|
| |
(sysif_init): Registered abort intrinsic.
* txr.1: Documented abort. Changed Unix Programming heading
to System Programming, since exit, abort and errno are not
Unix-specific, but C-specific.
* tl.vim, txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(uw_throw): In the unhandled case, check if *unhandled-hook* variable
has a function, and use it instead of the default logic. If it's not a
function, abort with an error message. Clear it so that if the hook
function re-enters this code, it will not be used. Always exit now on
unhandled exceptions; do not abort.
(uw_late_init): New function.
* unwind.h (uw_late_init): Declared.
* lib.c (init): Call uw_late_init.
* txr.1: Documented *unhandled-hook*.
* genvim.txr: Scan the unwind.c file, since it has a reg_var now.
* tl.vim, txr.vim: Updated.
|
|
|
|
| |
print an informative message.
|
|
|
|
| |
variable modification.
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (lookup_symac_lisp1, expand_lisp1,
expand_forms_lisp1): New static functions.
(expand): Handle dwim's arguments via
expand_forms_lisp1, rather than as a generic
compound form.
* txr.1: Revised text in several places to clarify
this expansion rule.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* inst.nsi: New file.
* win/env.nsh: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (EXTRA_OBJS-y): New variable.
(WINDRES): New recipe.
* configure: Check for presence of windres,
and generate add_win_res variable in config.make.
* win/txr.xcf: New file: GIMP project for icon.
* win/txr.ico: New file: icon with three sizes generated
from GIMP project.
* win/txr.rc: New file.
|
|
|
|
|
|
|
|
|
|
| |
* stream.h (strm_ops_init): New macro.
* stream.c (null_ops, stdio_ops, tail_ops, pipe_ops, string_in_ops,
byte_in_ops, string_out_ops, strlist_out_ops, dir_ops,
cat_stream_ops): Initialize using macro.
* syslog.c (syslog_strm_ops): 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.
|
| |
|
|
|
|
| |
fixed bad formatting under logtrunc and partition.
|
|
|
|
|
|
| |
was choking on keywords like :env in the lambda list,
and failing to handle the nested patterns of macro
lambda lists. Failing case: (defmacro x (: opt :env foo)).
|
|
|
|
|
| |
meaning "treat the argument as missing" must apply only to optional
parameters.
|
|
|
|
|
| |
A one element list being converted to a string
treated as an empty list, leading to empty string.
|
|
|
|
|
|
|
|
| |
* arith.h (width): Declared.
* eval.c (eval_init): Width registered as intrisinc.
* txr.1: Documented width.
|
|
|
|
|
|
|
|
|
| |
(do_mapf, mapf): new static functions.
(eval_init): protect call_f from gc, and initialize it.
re-register call function using call_f.
register mapf intrinsic.
* txr.1: Documented mapf.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
(eval_init): callf registered.
* txr.1: Documented callf.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
recognize forms like (+ 2 2) as constant.
* eval.c (constantp_noex, constantp): New functions.
(eval_init): Registered constantp as intrinsic.
* tl.vim, txr.vim: Updated.
* txr.1: Documented constantp.
|
|
|
|
|
|
|
|
|
|
|
| |
Close the stream unless close_after_p is specified and is nil,
or when it is missing, an there is no compatibility or it's
newer than version 102.
* stream.h (get_string): Updated declartion.
* txr.1: Documented default closing behavior of get-string
and the new optional argument for overriding it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
or variable bindings.
* eval.c (lexical_var_p, lexical_fun_p): New local functions.
(eval_init): Registered as intrinsics.
* txr.1: Documented lexical-var-p and lexical-fun-p.
* tl.vim, txr.vim: Updated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
| |
Use do;while(0) trick instead of local typedef
to cause terminating semicolon to be required.
(sig_restore_enable, sig_restore_disable):
Remove superfluous do { } while (0).
Closing a brace is good enough.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(glob_wrap, glob_init): New functions.
(errfunc_thunk): New static function.
* glob.h: New file.
* txr.c (main): call glob_init if HAVE_GLOB is defined.
* configure (have_glob): New variable.
(gen_config_make): Add have_glob to config/config.make.
Detect glob function and set have_glob, and add
HAVE_GLOB to config/config.h.
* Makefile (OBJS): Include glob.h if have_glob is "y".
* genvim.txr: Scan glob.c for functions and variables also.
* txr.1: Documented glob and glob-related variables.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
must return the empty string, not nil. Only
lists of non-characters fail to convert to a string.
Since programs may depend on the hitherto wrong,
undocumented behavior, this is made subject to
compatibility.
* txr.1: Added compatibility note.
|
|
|
|
| |
* txr.1: Update documentation for merge function.
|
|
|
|
| |
bindings captured in trailer section. Ouch!
|
| |
|
| |
|
|
|
|
|
|
| |
the program is not configured.
(distclean): Providing alternative implementation when the
program is not configured.
|
|
|
|
|
|
| |
sequence may be an infinite list in the case that the from argument
specifies a list of indices. We must avoid trying to calculate its
length before we have detected this case.
|
|
|
|
| |
replace not to refset.
|
|
|
|
|
|
|
|
|
|
| |
if get_line returns nil.
* stream.c (cat_get_line, cat_get_char, cat_get_byte): The catenated
stream read operations close an exhausted stream before popping
to the next one.
* txr.1: Document closing behavior of catenated streams.
|
|
|
|
|
|
|
|
| |
a different form as cat-streams.
* txr.1: Document cat-streams.
* tl.vim, txr.vim: Regenerated.
|
| |
|