| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
* parser.l: Combining the handling of hex, octal and binary numeric
literals into a single rule. Implementing an additional rule which
diagnoses such tokens that have trailing junk. Thus, something
like #x1F2AZ is now invalid syntax.
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (while_star_s, until_star_s): New symbol variables.
(me_while_star, me_until_star): New static functions.
(eval_init): Initialize new variables. Register while* and
until* macros.
* txr.1: Documented while* and until*.
* txr.vim, tl.vim: Regenerated.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* sysif.c (dup_wrap): New static function.
(sysif_init): Register dup_wrap as dupfd. The name dup
conflicts with an existing function.
* txr.1: Documented dupfd.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (fd_k): New keyword variable.
(stdio_get_prop): Handle the :fd property by returning
the file descriptor.
(open_fileno): New function.
(stream_init): Initialize fd_k, and register fileno and open-fileno.
* stream.h (open_fileno): Declared.
* txr.1: Documented open-fileno and fileno.
* utf8.c (w_fdopen): New function.
* utf8.h (w_fdopen): Declared.
|
| |
|
|
|
|
| |
no need to intern the symbol when registering me_until.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sysif.c (work_wrap, wait_wrap, wifexited, wexitstatus,
wifsignaled, wtermsig, wcoredump, wifstopped, wstopsig,
wifcontinued): New static functions.
(sysif_init): Register new intrinsics: functions fork, wait,
w-ifexited, w-exitstatus, w-ifsignaled, w-termsig,
w-coredump, w-ifstopped, w-stopsig, w-ifcontinued; and
variables w-nohang, w-untraced, w-continued.
* txr.1: Documented.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
| |
(me_iflet_whenlet): New static function.
(eval_init): Initialize when_s, iflet_s. Use
when_s for registering me_when.
Register me_iflet_whenlet.
* txr.1: Documented iflet and whenlet.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
| |
* txr.1: move the documentation of some control and
iterative macros from between if and cond to after
the control constructs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (while_s): New symbol variable.
(me_whilet): New static function.
(eval_init): Initialize while_s. Use while_s in registration
of while macro. Register new whilet macro.
* txr.1: whilet is documented.
* tl.vim, txr.vim: Regenerated.
|
| |
|
|
|
|
|
|
|
|
| |
* eval.c (zap_s): New global variable.
(op_modplace): Support zap.
(eval_init): Initialize zap_s, and register as operator.
* txr.1: Documented zap.
|
|
|
|
|
|
|
|
|
| |
* eval.c (APPLY_ARGS): New preprocessor symbol, replaces
hard-coded 32 inside apply.
(apply): Use APPLY_ARGS for argument array.
Fix overrun of args array in non-variadic function case when
list has more than APPLY_ARGS elements.
Eliminate superflous "variadic" local variable.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gc.h (zap): New inline function.
(z): New macro.
* lib.c (generic_funcall, funcall1, funcall2, funcall4, do_not,
do_dup, do_iff): Use z macro to burn funargs with no next use.
* eval.c (apply, apply_frob_args, iapply, call, do_eval,
op_dwim, mapcarv, mappendv, lazy_mapcarv_func, mapdov, do_apf,
do_ipf, callf): Use z macro to burn funargs with no next use.
|
|
|
|
| |
when argument is a bignum integer.
|
|
|
|
|
|
| |
(s_mp_tovalue): Eliminate use of isupper, islower.
* mpi-patches/series: Add patch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (struct stdio_mode): New struct type.
(stdio_mode_init_trivial): New initializer macro.
(parse_mode, format_mode, normalize_mode, set_mode_props):
New static functions.
(make_stdio_stream_common): the isatty check, and automatic marking
of tty device streams as real-time is no longer done, unless
backward compatibility 105 or earlier is requested.
(open_file, open_tail, open_command, open_process): Use new
mode parsing, which supports the "i" flag.
(stream_init): If we have isatty, and standard input is a tty,
then mark the *std-input* stream as real-time.
* txr.1: Document -n/--noninteractive option. Fix typo where
real-time-stream-p is referred to as stream-real-time-p.
Document "i" flag on open-file and others.
* txr.c (opt_noninteractive): New global.
(help): Help text for -n/--noninteractive.
(txr_main): Handle new options.
* txr.h (opt_noninteractive): Declared.
|
|
|
|
|
|
|
|
|
|
|
| |
(tprint): New function.
(eval_init): Register tprint as intrinsic.
* eval.h (prinl, pprinl, tprint): Declared.
* txr.c (txr_main): New option, -t.
* txr.1: Documented tprint and -t option.
|
|
|
|
|
|
|
|
| |
argument.
* lib.c (lazy_stream_cons): Default the argument to std_input.
* txr.1: Document that the stream is optional in get-lines.
|
| |
|
|
|
|
|
|
| |
* configure (have_git): Don't set this variable if
the TXR repository is missing, even if git is installed.
I.e. have_git means have have the tool and the repo.
|
|
|
|
|
|
|
| |
radix is 16. Also, thrown an error if radix is not in the range
0 to 36.
* txr.1: Document int-str's radix range restriction.
|
|
|
|
|
|
|
| |
Also documented -P.
(txr_main): New option implemented, -P.
* txr.1: Document -P, and clean up -e and -p documentation.
|
| |
|
|
|
|
|
| |
we were freeing C strings that were not duplicated, but only borrowed
from string objects.
|
|
|
|
|
| |
and associated memory leak. Correctly allocate only nargs + 1 elements
for argv array, not nargs + 2.
|
|
|
|
|
|
|
| |
(ensure_dir): New function.
(sysif_init): ensure_dir registered as intrinsic.
* txr.1: ensure_dir documented.
|
|
|
|
|
|
|
| |
moved here from parser.l.
* parser.l (open_txr_file, regex_parse, lisp_parse): Functions
moved from here to parser.c.
|
|
|
|
|
|
|
|
|
|
| |
* parser.h (parser_s): Declared.
(parse_init): Declaration removed.
(parser_l_init): Declared.
* parser.l (parse_init): Function renamed to parser_l_init.
* parser.c: New file.
|
|
|
|
|
|
|
|
|
| |
* eval.c (me_ignerr): New static function.
(eval_init): Registered ignerr macro.
* txr.1: Documented.
* 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 (last_form_expanded): New variable.
(do_expand): New static function; contains previous expand
function.
(expand): Becomes a wrapper for do_expand, with re-entry
counting.
(eval_init): GC-protect last_form_expanded.
* eval.h (last_form_expanded): Declared.
* parser.l (regex_parse, lisp_parse): Just use a simple word for
the name of the regex or string parse location, not the entire
expression itself.
* unwind.c (uw_throw): Check whether expansion was going on
when the unhandled exception was thrown and print additional
information.
|
|
|
|
|
| |
should return zero length, rather than nil. This is achieved by trying
the match at one past the last character.
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register search-regst, match-regst
and match-regst-right intrinsics.
* regex.c (search_regst, match_regst, match_regst_right): New functions.
* regex.h (search_regst, match_regst, match_regst_right): Declared.
* txr.1: Documented new variants.
|
|
|
|
| |
elements which have a higher precedence than catenation.
|
|
|
|
|
|
| |
messages about bad appends, do not show the list being
appended because it may be an infinite lazy list.
For instance (append* 3 lazy-list).
|
|
|
|
|
|
|
|
| |
* eval.c (pad_func, pad, weave_while, weave_gen, weavev):
New static functions.
(eval_init): Registered pad and weave intrisics.
* txr.1: Documented pad and weave.
|
|
|
|
|
|
|
|
|
| |
was silently ignoring lists after the first atom, instead of
throwing an error. Also, it was not detecting the case that
the last argument is a list which should just be returned,
and instead trying to find its tail in preparation for the
next call to lazy_appendv_func, the consequences being runaway
iteration over an infinite list.
|
|
|
|
|
|
|
|
|
|
| |
(lexical_lisp1_binding): New static function.
(eval_init): Initialize symacro_k and fun_k; register
new intrinsic function lexical-lisp1-binding.
* match.h (var_k): Existing external name declared.
* txr.1: Documented lexical-lisp1-binding.
|
|
|
|
|
| |
file and config.h, so windows resource file is rebuilt
when the version changes.
|
|
|
|
| |
DEP_INSTANTIATE macro.
|
|
|
|
| |
file is removed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register trunc-rem intrinsic.
* lib.h (trunc_rem): Declared.
* txr.1: Documented trunc-rem.
* tl.vim, txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of XMALLOC, XCALLOC, XREALLOC and XFREE for $(MPI_OBJS). MPI
does not use such macros and the allocator is already retargetted
to use the TXR one.
* mpi-patches/use-txr-allocator: In this patch, we don't need
external declaration for chk_malloc or chk_realloc because they
are not used. Only chk_calloc is used.
* mpi-patches/add-bitops: Refreshed.
* mpi-patches/add-mp-hash: Likewise.
* mpi-patches/add-mp-set-intptr: Likewise.
* mpi-patches/add-mpi-toradix-with-case: Likewise.
* mpi-patches/bit-search-optimizations: Likewise.
* mpi-patches/export-mp-eq: Likewise.
* mpi-patches/faster-square-root: Likewise.
* mpi-patches/fix-bad-shifts: Likewise.
* mpi-patches/fix-ctype-warnings: Likewise.
* mpi-patches/fix-mult-bug: Likewise.
* mpi-patches/mpi-set-double-intptr: Likewise.
* mpi-patches/mpi-set-mpi-word: Likewise.
* mpi-patches/mpi-to-double: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (EACH_CONF): Iterate over arguments.
(opt/txr-win.o, dbg/txr-win.o): New special object files.
(opt/%-win.o, dbg/%-win.o): New pattern rule to build special object
files.
($(PROG)-win, $(PROG)-win-dbg): New program targets.
* inst.nsi: Install txr-win.exe.
|