| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We extend the matching context structures to keep track of the
underlying stream from which lines are being taken via the lazy list.
Then the implementation of the @(eof) directive, when it hits the eof
condition, can use this stream to gain access to the termination status.
* match.c (match_line_ctx, match_files_ctx): New member, stream.
(ml_all): Take stream argument and initialize new member.
(h_call, do_match_line): Pass stream argument to h_call.
(mf_all, mf_file_data): Take stream argument and initialize new member.
(mf_from_ml): Propagate stream from line context to file context.
(freeform_prepare, v_next_impl, match_filter, match_fun, extract): Pass
stream argument where now needed.
(v_eof): Implement termination status binding via the stream stored
in the context.
(open_data_source): Store stream in match files context.
* tests/010/eof-status.txr: New file.
* tests/010/eof-status.expected: New file.
* Makefile (tst/tests/010/eof-status.ok): -B option for new test.
* txr.1: Documented eof directive, argument and all.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
| |
* txr.1: Fix code -> codn.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stdlib/doc-syms.tl: Updated.
* sysif.c (rlim_s, cur_s, max_s): New symbol variables.
(rlim_st): New variable.
(getrlimit_wrap, setrlimit_wrap): New functions.
(sysif_init): gc-protect rlim-st. Initialize symbol
vsariables. Create rlim struct type. Register getrlimit and
setrlimit intrinsics. Register variables rlim-saved-max,
rlim-saved-cur, rlim-infinity, rlimit-core, rlimit-cpu,
rlimit-data, rlimit-fsize, rlimit-nofile, rlimit-stack and
rlimit-as.
* txr.1: Documented under new Unix Resource Limits section.
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c, stream.h (add_suffix): New function.
(stream_init): add-suffix intrinsic registered.
* tests/018/path.tl: Tests.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c, lib.h (chk_substrdup): New function.
* stream.c, stream.h (trim_short_suffix, trim_long_suffix):
New functions.
(stream_init): trim-short-suffix and trim-long-suffix
intrinsics registered.
* tests/018/path.tl: New tests.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (separate): New function.
* lib.h (separate): Declared.
* eval.c (eval_init): Register separate intrinsic.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register built-in-type-p intrinsic.
* lib.c (buitin_type_p): Rename to built_in_type_p since the
word built-in is hyphenated. The function also tests
whether the argument is a COBJ class.
(cobj_class_exists): Function removed.
* stdlib/doc-syms.tl: Updated.
* stdlib/struct.tl (defstruct): Add built-in-type-p check.
* struct.c (make_struct_type): Call only built_in_type_p;
cobj_class_exists is gone.
* txr.1: Document built-in-type-p.
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: There is no cptr-put function; it is called cptr-out.
The last paragraph refers to cptr-out and it is referenced
elsewhere. It has to be cptr-out because it implements the
"out semantics" in FFI conversion which pairs with "put";
cptr-put would be a different function, which is not currently
implemented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
| |
* genman.txr: Before generating stdlib/doc-syms.tl, check that the
symbols going into that file (i.e., into the doc-syms variable) are
actually contained in the TXR image (allowing for some exceptions).
Also, reindent some lines.
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: Make consistent the style for ellipses in .coNP lines (i.e.,
without the word "and"). Emend some incorrectly named symbols. Fix
various typos and other inconsistencies in .coNP lines.
* checkman.txr (check-func): Add exception for caar. Add missing
patterns for "Pattern macro", "Operator/function" and "Macro/function".
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is like find-if, but returns the value of the predicate
function rather than the item.
* eval.c (eval_init): Register find-true instrinsic.
* lib.c (find_true): New function.
* lib.c (find_true): Declared.
* stdlib/doc-syms.tl: Updated.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (path_test_set_entries): Autoload on path-search.
* stdlib/path-test.tl (path-search): New function.
* tests/018/path-test.tl: New file.
* txr.1: Documented.
* stdlib/doc-lookup.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* regex.c (regex_optimize): New static function, capturing the
three optimization passes.
(regex_compile): Code moved into regex_optimize.
(regex_init): Remove sys:reg-optimize function. Register
regex-optimize.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
This affects run-time also. Txr installations where the
executable is not in directory ending in ${bindir}
will look for stdlib rather than share/txr/stdlib,
relative to the determined installation directory.
* txr.c (sysroot_init): If we detect relative to the short
name, or fall back on the program directory, use stdlib
rather than share/txr/stdlib as the stdlib_path.
* INSTALL: Update some installation notes not to refer to
share/txr/stdlib but stdlib.
* Makefile (STDLIB_SRCS): Refer to stdlib, not
share/txr/stdlib.
(clean): In unconfigured mode, remove the old share/txr/stdlib
entirely. Remove .tlo files from stdlib.
(install): Install lib materials from stdlib.
* txr.1: Updated documentation under Deployment Directory Structure.
* share/txr/stdlib/{asm,awk,build,cadr}.tl:
Renamed to stdlib/{asm,awk,build,cadr}.tl.
* share/txr/stdlib/{compiler,conv,copy-file,debugger}.tl:
Renamed to stdlib/{compiler,conv,copy-file,debugger}.tl.
* share/txr/stdlib/{defset,doc-lookup,doc-syms,doloop}.tl:
Renamed to stdlib/{defset,doc-lookup,doc-syms,doloop}.tl.
* share/txr/stdlib/{each-prod,error,except,ffi}.tl:
Renamed to stdlib/{each-prod,error,except,ffi}.tl.
* share/txr/stdlib/{getopts,getput,hash,ifa}.tl:
Renamed to stdlib/{getopts,getput,hash,ifa}.tl.
* share/txr/stdlib/{keyparams,match,op,optimize}.tl:
Renamed to stdlib/{keyparams,match,op,optimize}.tl.
* share/txr/stdlib/{package,param,path-test,pic}.tl:
Renamed to stdlib/{package,param,path-test,pic}.tl.
* share/txr/stdlib/{place,pmac,quips,save-exe}.tl:
Renamed to stdlib/{place,pmac,quips,save-exe}.tl.
* share/txr/stdlib/{socket,stream-wrap,struct,tagbody}.tl:
Renamed to stdlib/{socket,stream-wrap,struct,tagbody}.tl.
* share/txr/stdlib/{termios,trace,txr-case,type}.tl:
Renamed to stdlib/{termios,trace,txr-case,type}.tl.
* share/txr/stdlib/{ver,vm-param,with-resources,with-stream}.tl:
Renamed to stdlib/{ver,vm-param,with-resources,with-stream}.tl.
* share/txr/stdlib/yield.tl: Renamed to stdlib/yield.tl.
* share/txr/stdlib/{txr-case,ver}.txr:
Renamed to stdlib/{txr-case,ver}.txr.
* gencadr.txr: Update to stdlib/place.tl.
* genman.txr: Update to stdlib/cadr.tl.
|