| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* LICENSE, LICENSE-CYG, METALICENSE, Makefile, alloca.h,
args.c, args.h, arith.c, arith.h, autoload.c, autoload.h,
buf.c, buf.h, cadr.c, cadr.h, chksum.c, chksum.h,
chksums/crc32.c, chksums/crc32.h, combi.c, combi.h, configure,
debug.c, debug.h, eval.c, eval.h, ffi.c, ffi.h, filter.c,
filter.h, ftw.c, ftw.h, gc.c, gc.h, glob.c, glob.h, gzio.c,
gzio.h, hash.c, hash.h, itypes.c, itypes.h, jmp.S,
lex.yy.c.shipped, lib.c, lib.h, linenoise/linenoise.c,
linenoise/linenoise.h, match.c, match.h, parser.c, parser.h,
parser.l, parser.y, protsym.c, psquare.h, rand.c, rand.h,
regex.c, regex.h, signal.c, signal.h, socket.c, socket.h,
stdlib/arith-each.tl, stdlib/asm.tl, stdlib/awk.tl,
stdlib/build.tl, stdlib/cadr.tl, stdlib/compiler.tl,
stdlib/constfun.tl, stdlib/conv.tl, stdlib/copy-file.tl,
stdlib/debugger.tl, stdlib/defset.tl, stdlib/doloop.tl,
stdlib/each-prod.tl, stdlib/error.tl, stdlib/except.tl,
stdlib/ffi.tl, stdlib/getopts.tl, stdlib/getput.tl,
stdlib/hash.tl, stdlib/ifa.tl, stdlib/keyparams.tl,
stdlib/match.tl, stdlib/op.tl, stdlib/optimize.tl,
stdlib/package.tl, stdlib/param.tl, stdlib/path-test.tl,
stdlib/pic.tl, stdlib/place.tl, stdlib/pmac.tl,
stdlib/quips.tl, stdlib/save-exe.tl, stdlib/socket.tl,
stdlib/stream-wrap.tl, stdlib/struct.tl, stdlib/tagbody.tl,
stdlib/termios.tl, stdlib/trace.tl, stdlib/txr-case.tl,
stdlib/type.tl, stdlib/vm-param.tl, stdlib/with-resources.tl,
stdlib/with-stream.tl, stdlib/yield.tl, stream.c, stream.h,
struct.c, struct.h, strudel.c, strudel.h, sysif.c, sysif.h,
syslog.c, syslog.h, termios.c, termios.h, time.c, time.h,
tree.c, tree.h, txr.1, txr.c, txr.h, unwind.c, unwind.h,
utf8.c, utf8.h, vm.c, vm.h, vmop.h, win/cleansvg.txr,
y.tab.c.shipped: Copyright year bumped to 2023.
|
|
|
|
|
|
|
|
|
| |
* Makefile (COMPILE_TL): Before we invoke txr --compile,
let's make sure there isn't a .tmp file left over by
a previous failed compile job. Otherwise --compile
will consider that to be an up-to-date compiled file
due to its newer timestamp relative to the .tl file,
and we end up renaming that to .tlo.
|
|
|
|
|
|
|
|
|
| |
* Makefile (HARDLINK): Print a diagnostic if the link
command fails and ignore the situation. Hard links are
restricted on Android. On that platform, txr being
available under the names txrlisp and txrvm is likely
of limited utility, so we won't waste space by making
copies of the executable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (LN): New variable. On platforms where
you can't hard link, this can be replaced with some
other command. Possibly "true" not to have the alternative
executable name created at all.
(HARDLINK): New macro.
(install): Use HARDLINK to create a link named txrlisp
pointing to the same file as txr in the destination
directory.
* txr.c (txr_main): If the executable ends with "lisp"
(or "lisp.exe" on Windows), then default the txr_lisp_p
variable to t, which has the effect as if --lisp had
been processed.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The --free-all feature is broken. It is needed for confirming
lack of memory leaks during development. What breaks it is the
atexit call to run_load_hooks in eval.c, which occurs after
the atexit call to free_all in txr.c which blows everything
away.
* Makefile (tst/tests/019/load-hook.ok): Let's put --free-all
on this test case, because it has to with the load hooks.
Make no mistake though: everything crashes with --free-all,
not this test case specifically.
* txr.c (opt_free_all): New global variable.
(free_all): Free resources only if opt_free_all is true.
Lose the paranoid called flag.
(main): Register free_all with atexit before callilng init.
This ensures that it will be called after any atexit
handlers registered as part of init, like the one in sysif.c
and eval.c.
(txr_main): The --free-all option now just sets opt_free_all.
* txr.h (opt_free_all): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (OBJS): Conditionally include new gzio.o object file.
* configure: Detect external zlib, setting up new have_zlib
variable in config.make, HAVE_ZLIB in config.h, and also -lz
in conf_ldlibs.
* gzio.[ch]: New files, implementing the stream abstraction
over the gzip file I/O routines in zlib.
* stream.h (struct stdio_mode): New gzip flag and gzlevel
bitfield to hold a value 0 to 9.
(stdio_mode_init_blank, stdio_mode_init_r, stdio_mode_init_rpb):
Update intializers to cover new bitfield members.
* stream.c: Include <zlib.h> and "gzio.h" if HAVE_ZLIB.
(do_parse_mode): Recognize new mode modifier letter "z",
setting the gzip flag in the mode structure. If it's followed
by a digit, set the gziplevel to that value.
(format_mode): Don't output "b" letter for binary mode if
gzip is set, because gzopen interprets "b" differently.
Don't put out "t" if gzip is set. If gzip mode is specified,
do put out the level. If gzip is set, and gziplevel is nonzero
then encode the level: gzopen will understand it.
(open_file): If gzip mode is requested, then open the file
using gzopen mode, a new function in gzio.c. The return a
gzio stream based on the returned gzip file handle. However,
if we are reading, and the gzip stream indicates that it's
not decompressing anything, then we close it and open the
file using an ordinary stream.
(stream_init): Call gzio_init if HAVE_ZLIB is true. This is done
here because the module is integrated with stream.c, and also
so that lib.c doesn't have to know about HAVE_ZLIB and <zlib.h>.
|
|
|
|
|
|
|
|
|
| |
* txr.c (help): Mention new options.
(do_compile_opt, do_in_package_opt): New static functions.
(txr_main): Implement options.
* Makefile (COMPILE_TL): Use the options instead of -e.
* txr.1: Document.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (OBJS): rename lisplib.o to autoload.o.
* lisplib.c: Renamed to autoload.c.
(lisplib_init_tables): Renamed to autoload_init_tables.
(lisplib_init): Renamed to autoload_init, and calls
autoload_init_tables.
(lisplib_try_load): Renamed to autoload_try.
(autoload_try_fun, autoload_try_var, autloload_try_slot,
autoload_try_struct, autoload_try_keyword): Follow rename.
* lisplib.h: Renamed to autoload.h.
(lisplib_init): Renamed to autoload_init.
* eval.c: Include autoload.h.
(eval_init): Follow rename of lisplib_init.
* gencadr.txr: include "autoload.h"
* cadr.c: Regenerated.
|
|
|
|
|
|
|
|
|
| |
* configure (have_ubsan): New variable. This is set to y
in the ubsan test, if detected.
(gen_config_make): Add have_ubsan variable to config.make.
* Makefile (TESTS_OK): If have_ubsan is true, filter out
the ../012/stack.ok target that calls for that test case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*LICENSE, LICENSE-CYG, METALICENSE, Makefile, alloca.h,
args.c, args.h, arith.c, arith.h, buf.c, buf.h, cadr.c,
cadr.h, chksum.c, chksum.h, chksums/crc32.c, chksums/crc32.h,
combi.c, combi.h, configure, debug.c, debug.h, eval.c, eval.h,
ffi.c, ffi.h, filter.c, filter.h, ftw.c, ftw.h, gc.c, gc.h,
glob.c, glob.h, hash.c, hash.h, itypes.c, itypes.h, jmp.S,
lex.yy.c.shipped, lib.c, lib.h, linenoise/linenoise.c,
linenoise/linenoise.h, lisplib.c, lisplib.h, match.c, match.h,
parser.c, parser.h, parser.l, parser.y, protsym.c, psquare.h,
rand.c, rand.h, regex.c, regex.h, signal.c, signal.h,
socket.c, socket.h, stdlib/arith-each.tl, stdlib/asm.tl,
stdlib/awk.tl, stdlib/build.tl, stdlib/cadr.tl,
stdlib/compiler.tl, stdlib/constfun.tl, stdlib/conv.tl,
stdlib/copy-file.tl, stdlib/debugger.tl, stdlib/defset.tl,
stdlib/doloop.tl, stdlib/each-prod.tl, stdlib/error.tl,
stdlib/except.tl, stdlib/ffi.tl, stdlib/getopts.tl,
stdlib/getput.tl, stdlib/hash.tl, stdlib/ifa.tl,
stdlib/keyparams.tl, stdlib/match.tl, stdlib/op.tl,
stdlib/optimize.tl, stdlib/package.tl, stdlib/param.tl,
stdlib/path-test.tl, stdlib/pic.tl, stdlib/place.tl,
stdlib/pmac.tl, stdlib/quips.tl, stdlib/save-exe.tl,
stdlib/socket.tl, stdlib/stream-wrap.tl, stdlib/struct.tl,
stdlib/tagbody.tl, stdlib/termios.tl, stdlib/trace.tl,
stdlib/txr-case.tl, stdlib/type.tl, stdlib/vm-param.tl,
stdlib/with-resources.tl, stdlib/with-stream.tl,
stdlib/yield.tl, stream.c, stream.h, struct.c, struct.h,
strudel.c, strudel.h, sysif.c, sysif.h, syslog.c, syslog.h,
termios.c, termios.h, time.c, time.h, tree.c, tree.h, txr.1,
txr.c, txr.h, unwind.c, unwind.h, utf8.c, utf8.h, vm.c, vm.h,
vmop.h, win/cleansvg.txr, y.tab.c.shipped: Copyright year
bumped to 2022.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (TXR_CFLAGS): Pull in $(CPPFLAGS) also. It seems
some distros like Gentoo are relying on programs to
interpolate CPPFLAGS, and use this variable for passing
preprocessor-level options like -Dfoo=bar. This is an
incredibly bad, unnecessary idea, but let's play along.
Now because we are merging this into TXR_CFLAGS, it means
that these preprocessor-only flags are used for linking,
when nothing is being preprocessed, which makes no sense.
However, GNU Make's built-in recipe for linking C code seems
to do the same thing.
|
|
|
|
|
|
|
| |
* Makefile (clean-c): New target, complementary to clean-tlo,
to only clean the C object files, executables and related
materials, without touching the .tlo files.
(clean): Depend on clean-c; body entirely moved into clean-c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (psquare.o): New object file.
* arith.c (psq_ops): New static structure.
(quant_fun): New static function.
(quantile): New function.
(arith_init): Register quantile intrinsic.
* arith.h (quantile): Declared.
* psquare.c, psquare.h: New files.
* tests/016/arith.tl: New tests.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
| |
* Makefile (tst/tests/019/%): Clear TXR_DBG_OPTS for this
recently introduced directory, so txr isn't run with
--gc-debug.
|
|
|
|
|
| |
* Makefile (SRCS): Fix mixture of tabs and spaces, and bad
alignment, reported by Paul A. Patience.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes the conceptual issue that when there is no termios
support (HAVE_TERMIOS is absent/false), then there is no
listener at all, even though the listener supports plain mode
that doesn't require termios.
* Makefile (linenoise/linenoise.o): Link in unconditionally,
not subject to have_termios.
* linenoise.c: Include termios-related header only if
HAVE_TERMIOS.
(struct lino_state): Define the completion_callback and
orig_termios members only if HAVE_TERMIOS.
(wcnsprintf, atexit_handler, enable_raw_mode,
disable_raw_mode, get_cursor_position, get_columns,
lino_clear_screen, refresh_line, handle_resize, generate_beep,
delete_undo, free_undo_stack, record_undo, record_triv_undo,
remove_noop_undo, restore_undo, undo_subst_hist_idx,
undo_renumber_hist_idx, free_completions, sync_data_to_buf,
compare_completions, complete_line, lino_set_completion_cb,
lino_add_completion, next_hist_match, copy_display_params,
history_search, ab_init, ab_append, ab_free, sync_data_to_buf,
copy_display_params, refresh_singleline, col_offset_in_str,
refresh_multiline, refresh_line, move_cursor_multiline,
move_cursor, scan_match_rev, scan_rev, scan_match_fwd,
scan_fwd, find_nearest_paren, usec_delay, paren_jump, flash,
yank, yank_by_ptr, update_sel, clear_sel, yank_sel,
delete_sel, edit_insert, edit_insert_str, edit_move_left,
edit_move_right, edit_move_home, edit_move_sol, edit_move_end,
edit_move_eol, edit_move_matching_paren, edit_history_next,
edit_delete, edit_backspace, edit_delete_prev_all,
edit_delete_to_eol, edit_delete_prev_word, edit_delete_line,
tr, char, edit_in_editor, edit, sigwinch_handler): Functions
defined only if HAVE_TERMIOS.
(struct abuf, struct row_values): Struct types defined only if
HAVE_TERMIOS.
(screen_rows): Defined only if HAVE_TERMIOS.
(linenoise): Support only noninteractive read loop unless
HAVE_TERMIOS.
(lino_make): If HAVE_TERMIOS is false, then set the
noninteractive flag, so the linenoise function enters
the plain-mode loop.
(lino_cleanup, lino_hist_add): Add #ifdefs to avoid calling
nonexistent functions when HAVE_TERMIOS is false.
* linenoise/linenoise.h (struct lino_completions,
lino_compl_cb_t): Define these types only if HAVE_TERMIOS.
(lino_set_completion_cb, lino_add_completion): Declare only if
HAVE_TERMIOS.
* parser.c: Include linenoise/linenoise.h unconditionally.
(report_security_problem, load_rcfile, repl_intr,
read_eval_ret_last, get_home_path, repl_warning,
is_balanced_line, hist_save): Now define regardless of
HAVE_TERMIOS.
(repl): Define regardless of HAVE_TERMIOS, but don't set
completion or atom callback if HAVE_TERMIOS is false.
* parser.h (repl): Declare unconditionally, not subject to
HAVE_TERMIOS.
* txr.c (if_termios): New macro.
(opt_noninteractive): Initialize to 1 if HAVE_TERMIOS is false.
(help): Text about entering into listener mode is always
present now, even in a build withou HAVE_TERMIOS.
(banner): Function is always defined. If we don't
HAVE_TERMIOS, then the unused string literal that will
never be printed is replaced by nil.
(hint): Function removed.
(txr_main): Blocks conditional on HAVE_TERMIOS that either
call banner and go to the repl, or else call hint and exit,
are reduced to unconditionally calling banner and going to the
repl. All #if HAVE_TERMIOS blocks are similarly replaced with
just the HAVE_TERMIOS case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile, alloca.h, args.c, args.h, arith.c, arith.h, buf.c,
buf.h, chksum.c, chksum.h, chksums/crc32.c, chksums/crc32.h,
combi.c, combi.h, debug.c, debug.h, eval.c, eval.h, ffi.c,
ffi.h, filter.c, filter.h, ftw.c, ftw.h, gc.c, gc.h, glob.c,
glob.h, hash.c, hash.h, itypes.c, itypes.h, jmp.S, lib.c,
lib.h, lisplib.c, lisplib.h, match.c, match.h, parser.c,
parser.h, parser.l, parser.y, rand.c, rand.h, regex.c,
regex.h, signal.c, signal.h, socket.c, socket.h,
stdlib/asm.tl, stdlib/awk.tl, stdlib/build.tl,
stdlib/compiler.tl, stdlib/constfun.tl, stdlib/conv.tl,
stdlib/copy-file.tl, stdlib/debugger.tl, stdlib/defset.tl,
stdlib/doloop.tl, stdlib/each-prod.tl, stdlib/error.tl,
stdlib/except.tl, stdlib/ffi.tl, stdlib/getopts.tl,
stdlib/getput.tl, stdlib/hash.tl, stdlib/ifa.tl,
stdlib/keyparams.tl, stdlib/match.tl, stdlib/op.tl,
stdlib/optimize.tl, stdlib/package.tl, stdlib/param.tl,
stdlib/path-test.tl, stdlib/pic.tl, stdlib/place.tl,
stdlib/pmac.tl, stdlib/quips.tl, stdlib/save-exe.tl,
stdlib/socket.tl, stdlib/stream-wrap.tl, stdlib/struct.tl,
stdlib/tagbody.tl, stdlib/termios.tl, stdlib/trace.tl,
stdlib/txr-case.tl, stdlib/type.tl, stdlib/vm-param.tl,
stdlib/with-resources.tl, stdlib/with-stream.tl,
stdlib/yield.tl, stream.c, stream.h, struct.c, struct.h,
strudel.c, strudel.h, sysif.c, sysif.h, syslog.c, syslog.h,
termios.c, termios.h, time.c, time.h, tree.c, tree.h, txr.c,
txr.h, unwind.c, unwind.h, utf8.c, utf8.h, vm.c, vm.h, vmop.h:
License reformatted.
* lex.yy.c.shipped, y.tab.c.shipped, y.tab.h.shipped: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* Makefile (txr-manpage.pdf): If SOURCE_DATE_EPOCH exists,
then run pdf-clobber-stamps.tl.
* pdf-clobber-stamps.tl: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, it is possible to
make build_id=abcd
to rebuild TXR with the given build ID. Any changes in the
value of a dynamic, git-generated build_id will likewise
trigger a rebuild.
* Makefile (old_build_id): New variable. We read the old build
ID from a file called .build_id in the build directory. If
it differs from the current expanded ID, build_id_exp,
we remove the object files affected by build_id.
In all cases, we then write the current build ID into the
.build_id file.
(clean, distclean): Remove .build_id.
|
|
|
|
|
| |
* Makefile (tst/%.ok): If a .txr test terminates with status
13, that indicates that it should be skipped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A build-id is a string optionally embedded into TXR at build
time which can be displayed with a command line option. It can
help developers who are juggling multiple builds in their
workspace to identify what they are running.
* Makefile (txr.o, txr-win.o): If a build_id has been
defined, then define the TXR_BUILD_ID macro on the command
line when compiling these object files.
* configure (build_id): New variable.
(help) Describe build_id.
(gen_config_make): Generate build_id and build_id_exp make
variables.
* txr.1: Documented --build-id option.
* tsr.c (build_id): Conditionally defined global variable.
(help): Brief help string for --build-id.
(txr_main): Process --build-id option.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (tainted): Fix typo. Reword sentence.
(rebuild): Remove obsolete references to repatch target.
(clean, distclean): Remove tst directory. Separate directory removals
from file removals. Remove txr-manpage.html and txr-manpage.pdf in both
distclean targets. In non-configured distclean, correct the
removal of .tlo files to be from the stdlib directory rather than from
share (and limit the pattern to *.tlo rather than *.tlo*, since .tlo2
files are no longer generated); and explicitly remove config.h and
config.make, just like the configured distclean.
|
|
|
|
|
|
|
|
| |
* Makefile (install-tests): In the generated run.sh, let's
allow flexibility in the installation location of the tests by
avoiding a cd to an absolute path where the tests are assumed
to be installed. Let's assume that they are installed
relative to where the run.sh script is, and cd there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (SHIPPED): New variable, holds names of files that
get copied to a .shipped suffix and commited to the repo.
(ABBREV3SH): New macro, version of ABBREV3 that doesn't assume
it is expanding an entire recipe line, and thus can be
embedded into shell commands.
(%.shipped): Rule removed.
(shipped): New rule that prints what it is copying.
Non-maintainer version of rule errors out.
|
|
|
|
|
|
|
|
|
| |
* Makefile (%.shipped): Call the ABBREV macro to produce
output when "make *.shipped" is invoked, otherwise unless
VERBOSE=1 is used, it works silently. This is only in
maintainer mode. The rule in regular mode has the ABBREV
call. (But should we have that rule at all outside of
maintainer mode?)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makefile (%.expected): New implicit rule. Whenever a test requires a
.expected file, if it is missing, we create an empty one.
This file will be treated as an intermediate by GNU Make, which means
that it will be deleted when make terminates.
* tests/012/compile.tl: Some of the .tl files no longer have
an .expected file, so we have to test for that in the
catenating logic.
* tests/008/call-2.expected,
* tests/008/no-stdin-hang.expected,
* tests/011/macros-3.expected,
* tests/011/patmatch.expected,
* tests/012/aseq.expected,
* tests/012/ashwin.expected,
* tests/012/compile.tl,
* tests/012/cont.expected,
* tests/012/defset.expected,
* tests/012/ifa.expected,
* tests/012/oop-seq.expected,
* tests/012/parse.expected,
* tests/012/quasi.expected,
* tests/012/quine.expected,
* tests/012/seq.expected,
* tests/012/struct.expected,
* tests/012/stslot.expected,
* tests/014/dgram-stream.expected,
* tests/014/in6addr-str.expected,
* tests/014/inaddr-str.expected,
* tests/014/socket-basic.expected,
* tests/015/awk-fconv.expected,
* tests/015/split.expected,
* tests/015/trim.expected,
* tests/016/arith.expected,
* tests/016/ud-arith.expected,
* tests/017/ffi-misc.expected,
* tests/018/chmod.expected: Empty file deleted.
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (%.tab.c %.tab.h): Remove the trick of keeping the
old y.tab.h file if it has not changed. This was once a good
idea, but now that we have a proper grouped targets pattern
rule which knows that y.tab.h depends on and is produced from
parser.y, the trick causes y.tab.h to be perpetually out of
date due to its old time stamp, and so yacc is run on every
build.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MacOS sed doesn't accept semicolon termination for
commands involving defining labels or branching to labels.
This is not a new issue, but it is revealed on newer MacOS
because the sed now complains about unused labels.
In the sed command ':x; /whatever/ { ...; tx }', everything
after the initial : is interpreted as a label.
* Makefile (DEPGEN): Split the sed command's syntax up into
logical lines using multiple -e commands, applying some
formatting with indentation to try to keep it readable.
It looks like multiple -e options just glue together to
make a program, as if they were lines of code; one -e
can define a label referenced by another, and even the
closing brace can be treated as a separate command.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to a recent discussion in the GNU Make mailing list
about some issue related to grouped patterns, I hit upon the
realization that the rule y.tab.h y.tab.c: parser.y has
a common stem, y, which can be exploited to write a pattern
rule. This is only active in maintainer mode; in user mode,
the y.tab.h and y.tab.c are separately produced from .shipped
files.
* Makefile (y.tab.h): Eliminate rule which detects a removed
y.tab.h.
(y.tab.c): Delete rule, replacing with new rule.
(%.tab.c %.tab.h): New pattern rule, which groups the targets
together.
|
|
|
|
|
|
|
|
|
| |
I'm giving up and just using a recursive make invocation
for the "retest" target.
* Makefile (retest): Depend on nothing. Remove the tst
directory and invoke make tests recursively.
(tests.clean): Target removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Over two years ago, I disabled parallel building with a
.NOTPARALLEL: directive in the Makefile, due to some rules
that depended on order of updates of their prerequisites.
Today the situation is better. It looks like there are just a
few rules that have to be fixed, all in the area of executing
tests.
Let us not enable that by default, though, to protect
downstream users from themselves. Some operating system
distribution builds optimistically run make -j N on all the
packages, and then have to deal with sporadic breakages when
some of those packages have parallel build bugs. We can
prevent TXR from ever being implicated in such a breakage by
turning off parallel building even if make -j requests it.
There will now be a ./configure --parallelmake option
to allow parallel builds, off by default. The --maintainer
configuration mode will flip that default; configuring in
maintainer mode will enable parallel builds, unless explicitly
disabled with --no-parallelmake.
* Makefile (.NOTPARALLEL): Conditionally assert, if
parallelmake is false.
(tst/tests/014/dgram-stream.ok,
tst/tests/014/socket-basic.ok): Enforce order between these
two tests. They clash in their use of network ports so cannot
run at the same time.
(test.clean): test.clean must finish executing before tests;
enforce order.
* configure (parallelmake, parallelmake_given): New variables.
(help text): Add parallelmake option to help.
(gen_config_make): Generate the parallelmake make variable
into config.make.
New script section, defaulting parallelmake to y in maintainer
mode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch causes TXR to treat calls to verticatl functions,
as well as the @(call) directive to be considered non-matching
directives, so that opening the data source is deferred.
This allows included .txr files to call the funtions that they
define, without the side effect of standard input being read.
* match.c (open_data_source): Function refactored to reduce
duplication. c->data is checked first, and if it is not t,
nothing is done, making the function cheaper in the frequent
case. The non_matching_dir condition changes. We now check
that the first element of the first spec is a non-nil symbol.
If it has a function binding as a vertical function, then
that is considered non_matching.
(dir_tables_init): Treat @(call) as a non-matching directive.
* Makefile (tst/tests/008/no-stdin-hang.ok): Add -n argument
for non-interactive, which will cause stdin to be read in
that test case if there is a regression in this change. If
make tests is run in a terminal, this will hang make tests.
* tests/no-stdin-hang.txr: New file.
* tests/no-stdin-hang.expected: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (tst/tests/000/binding.ok): Pass -B to txr for this
new test.
* match.c (v_rebind): Fix gaping copy-and-paste bug here,
which causes rebind to take on the behavior of local/forget;
it takes all symbols that appear as its arguments from the
environment and produces an environment in which they
don't exist. What we want is to remove the left
variables from the environment, and since that is a nested
pattern, the right way to do that is to flatten it.
Bug reported by Frank Schwidom.
* tests/000/binding.txr: New file.
* tests/000/binding.expected: New file.
* txr.1: Improve documentation of @(rebind), also making
improvements in @(set) documentation.
|
|
|
|
| |
* Makefile (%.shipped): New pattern rule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our build system lumps all linker options together. The
correct way is that linker flags are separated info flags and
libs. Also, we respond to the LDFLAGS variable but ignore
LDLIBS which is incorrect. Other issues are fixed.
All that is fixed here.
* Makefile (TXR_CFLAGS): Interpolate $(CFLAGS) last, so that
options coming from CFLAGS can override previous options.
(TXR_LDFLAGS): Interpolate $(LDFLAGS) last; same reason.
(TXR_LDLIBS): New variable.
(LINK_PROG): Put $(TXR_LDFLAGS) with the options, before
the -o, and put $(TXR_LDLIBS) at the end.
* configure (conf_ldlibs, platform_ldlibs): New variables.
(usage text): Document platform-ldlibs and adjust
documentation of platform-ldflags.
(gen_config_make): Generate PLATFORM_LDLIBS and CONF_LDLIBS
now needed by Makefile.
(mainline): Adjusts various recipes to use conf_ldlibs
instead of conf_ldflags, or in some cases both.
In the case of libffi where we use pkg-config, we use the
special pgk-config options to separately extract the
flags and libs. We use EXTRA_LDLIBS instead of EXTRA_LDFLAGS
in some conftest invocations, as necessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* METALICENSE: 2020 copyrights bumped to 2021. Added note
about SHA-256 routines from Colin Percival.
* LICENSE, LICENSE-CYG, Makefile, alloca.h, args.c, args.h,
arith.c, arith.h, buf.c, buf.h, cadr.c, cadr.h, chksum.c,
chksum.h, chksums/crc32.c, chksums/crc32.h, combi.c, combi.h,
configure, debug.c, debug.h, eval.c, eval.h, ffi.c, ffi.h,
filter.c, filter.h, ftw.c, ftw.h, gc.c, gc.h, glob.c, glob.h,
hash.c, hash.h, itypes.c, itypes.h, jmp.S, lex.yy.c.shipped,
lib.c, lib.h, linenoise/linenoise.c, linenoise/linenoise.h,
lisplib.c, lisplib.h, match.c, match.h, parser.c, parser.h,
parser.l, parser.y, protsym.c, rand.c, rand.h, regex.c,
regex.h, share/txr/stdlib/asm.tl, share/txr/stdlib/awk.tl,
share/txr/stdlib/build.tl, share/txr/stdlib/cadr.tl,
share/txr/stdlib/compiler.tl, share/txr/stdlib/conv.tl,
share/txr/stdlib/copy-file.tl, share/txr/stdlib/debugger.tl,
share/txr/stdlib/defset.tl, share/txr/stdlib/doloop.tl,
share/txr/stdlib/each-prod.tl, share/txr/stdlib/error.tl,
share/txr/stdlib/except.tl, share/txr/stdlib/ffi.tl,
share/txr/stdlib/getopts.tl, share/txr/stdlib/getput.tl,
share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl,
share/txr/stdlib/keyparams.tl, share/txr/stdlib/op.tl,
share/txr/stdlib/package.tl, share/txr/stdlib/param.tl,
share/txr/stdlib/path-test.tl, share/txr/stdlib/place.tl,
share/txr/stdlib/pmac.tl, share/txr/stdlib/quips.tl,
share/txr/stdlib/save-exe.tl, share/txr/stdlib/socket.tl,
share/txr/stdlib/stream-wrap.tl, share/txr/stdlib/struct.tl,
share/txr/stdlib/tagbody.tl, share/txr/stdlib/termios.tl,
share/txr/stdlib/trace.tl, share/txr/stdlib/txr-case.tl,
share/txr/stdlib/type.tl, share/txr/stdlib/vm-param.tl,
share/txr/stdlib/with-resources.tl,
share/txr/stdlib/with-stream.tl, share/txr/stdlib/yield.tl,
signal.c, signal.h, socket.c, socket.h, stream.c, stream.h,
struct.c, struct.h, strudel.c, strudel.h, sysif.c, sysif.h,
syslog.c, syslog.h, termios.c, termios.h, time.c, time.h,
tree.c, tree.h, txr.1, txr.c, txr.h, unwind.c, unwind.h,
utf8.c, utf8.h, vm.c, vm.h, vmop.h, win/cleansvg.txr,
y.tab.c.shipped: Copyright year bumped to 2021.
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (conftest.android): New helper target for testing
for Android toolchain, via presence of __ANDROID__
preprocessor symbol, similarly to how we detect Darwin.
* configure: New test for Android. This is mutually exclusive
agains Darwin. On Android, we add some necessary feature
selection macros to the compiler command line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The trick of declaring static arrays whose size is the value
of an integer is not working with newer gcc 10 on Cygwin,
because that compiler is rearranging the order of the arrays
and adding padding. Basically, the writing on the wall is that
this is not a good approach.
I'm switching to a different approach. By initializing a
suitable C structure (which contains character arrays) in a
particular way, we can create a .o file in which a shell
script is embedded. We can pull out the shell script and
evaluate it to get the sizes of types.
* Makefile (conftest.syms): Rule removed.
(conftest.clean): Don't remove conftest.syms.
* configure (conftest_syms, read_syms): Functions removed.
(LANG, LC_ALL): New environment variables. This is needed
because we are using tr to process a binary file;
we can't have it trying to decode multi-byte characters.
(mainline): Use new trick for obtaining variables like
SIZEOF_INT.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (OBJS): Add new time.o.
* eval.c (eval_init): Registration of time functions is
removed from here; it is done in time_init now, in time.c.
* hash.c: Must #include "time.h" now.
* lib.c (time_s, time_local_s, time_utc_s, time_string_s,
time_parse_s, year_s, month_s, day_s, hour_s, min_s, sec_s,
dst_s, gmtoff_s, zone_s): Variable definitions removed.
These are now in time.c. Also declared in time.h.
(time_sec, time_sec_usec, gmtime_r, localtime_r, string_time,
time_string_local, time_string_utc, broken_time_list,
tm_to_time_struct, broken_time_struct, time_fields_local,
time_fields_utc, time_struct_local, time_struct_utc,
time_fields_to_tm, time_struct_to_tm, make_time_impl,
make_time, epoch_tm, strptime_wrap, time_parse, setenv,
unsetenv, timegm_hack, make_time_utc, time_meth,
time_string_meth, time_parse_meth, time_parse_local,
time_parse_utc): Functions removed. These are now in time.c.
(time_init): Removed, and now in time.c as an external
function.
* lib.h (time_sec, time_sec_usec, time_string_local,
time_string_utc, time_fields_local, time_fields_utc,
time_struct_local, time_struct_utc, make_time, make_time_utc,
time_parse, time_parse_local, time_parse_utc): Declarations
removed. Now in time.h.
* rand.c: Must #include "time.h" now.
* time.c: New file.
* time.h: New file.
|
|
|
|
|
|
|
|
|
| |
* Makefile (lex.yy.c): Move rule into maintainer conditional.
* configure: Describe maintainer variable in help text.
Move lex check into maintainer conditional.
* lex.yy.c.shipped: New file.
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (YACC_FLAGS): Removed. We don't need these because we
won't be trying to get newer Bison to behave like older Bison.
(y.tab.c): Drop reference to $(YACC_FLAGS).
* configure: Entire yacc-detecting section is conditional on
the maintainer Boolean variable. If the yacc program is
detected as Bison, check for version 2.5 and fail if not
found.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (BS_LIC_FROM, BS_LIC_TO): Variables removed.
(y.tab.c): Remove all filtering hacks. Don't remove the
license from y.tab.c. Don't remove yyparse declaration from
y.tab.h. Provide a pattern rule for producing any missing
file X from X.shipped. That's how y.tab.c and y.tab.h
get produced from y.tab.c.shipped and y.tab.h.shipped,
respectively, in user mode.
* y.tab.c.shipped, y.tab.h.shipped: New files, generated
using Bison 2.5.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is now a ./configure --maintainer mode which establishes
a variable called maintainer in config.make, with a y value.
The initial use for maintainer mode will be that the Yacc
parser (the y.tab.c and y.tab.h) files will no longer be
regenerated whenever the parser.y file is newer.
In the following commit, I will add a generated parser.
* Makefile (y.tab.h, y.tab.c): These rules are now only
enabled in maintainer mode via an ifeq.
* configure (maintainer): New variable.
(gen_config_make): Generate maintainer make variable
definition in config.make.
|
|
|
|
|
| |
* Makefile (lex.yy.c): Remove tabs that are being used for
alignment instead of spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The chmod fixes in the previous several commits were
caught by this.
* Makefile (tst/tests/018/chmod.ok): Set up TXR_ARGS for this
test to give it the location of the temporary file to use
as the object for testing permissions.
(tst/tests/018): Disable TXR_DBG_OPTS for new directory.
* tests/018/chmod.tl: New file.
* tests/018/chmod.expected: Likewise.
* tests/perm.tl: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The configure command line is now turned into an
executable script called reconfigure which can be invoked to
repeat the config.
* Makefile (distclean): Whether in a configured or state or
not, try to remove reconfigure. In the configured state, don't
remove config.log. (If distclean is invoked when not
configured, the config.* pattern will remove config.log).
* configure: rewrite the logic which turns the command line
into text. It is now robust against spaces, quotes and
meta-charaters. Moreover, the printed representation is chosen
according to good heuristics to minimize unnecessary quoting
and escaping. The config line is written into an executable
script called reconfigure. This is now done twice; it is done
immediately, so that we save the command line even if the
configure subsequently fails. A comment is added to
reconfigure indicating that configure didn't succeed. Then
after a successful run through the tests, we save it again,
without the cautionary comment. Help texts updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer versions of Bison produce spurious warnings in Yacc mode
about %pure-parser being not POSIX conforming and also
deprecated. Plus some strange fluff about "fix-its" that can
be applied if option --update is specified.
Let's detect at configure time whether the Yacc program
being used is actually Bison 3.0 or greater, and if so, give
it some flags to shut up these warnings.
* Makefile (YACC_FLAGS): New variable, conditionally set
based on yacc_is_newer_bison, also new variable, that being
generated into config.make.
(y.tab.c): Invoke $(TXR_YACC) with $(YACC_FLAGS).
(conftest.yacc-version): New phony target for running Yacc
with --version, out of the configure script.
* configure (yacc_is_newer_bison): New variable.
(gen_config_make): Generate yacc_is_newer_bison
make variable. New test for whether Yacc is Bison.
If so, and the version is >= 3.0, sets the
yacc_is_newer_bison variable to y.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* LICENSE, LICENSE-CYG, METALICENSE, Makefile, alloca.h, args.c,
args.h, arith.c, arith.h, buf.c, buf.h, cadr.c, cadr.h,
chksum.c, chksum.h, chksums/crc32.c, chksums/crc32.h, combi.c,
combi.h, configure, debug.c, debug.h, eval.c, eval.h, ffi.c,
ffi.h, filter.c, filter.h, ftw.c, ftw.h, gc.c, gc.h, glob.c,
glob.h, hash.c, hash.h, itypes.c, itypes.h, jmp.S, lib.c,
lib.h, linenoise/linenoise.c, linenoise/linenoise.h,
lisplib.c, lisplib.h, match.c, match.h, parser.c, parser.h,
parser.l, parser.y, protsym.c, rand.c, rand.h, regex.c,
regex.h, share/txr/stdlib/asm.tl, share/txr/stdlib/awk.tl,
share/txr/stdlib/build.tl, share/txr/stdlib/cadr.tl,
share/txr/stdlib/compiler.tl, share/txr/stdlib/conv.tl,
share/txr/stdlib/debugger.tl, share/txr/stdlib/defset.tl,
share/txr/stdlib/doloop.tl, share/txr/stdlib/error.tl,
share/txr/stdlib/except.tl, share/txr/stdlib/ffi.tl,
share/txr/stdlib/getopts.tl, share/txr/stdlib/getput.tl,
share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl,
share/txr/stdlib/keyparams.tl, share/txr/stdlib/op.tl,
share/txr/stdlib/package.tl, share/txr/stdlib/param.tl,
share/txr/stdlib/path-test.tl, share/txr/stdlib/place.tl,
share/txr/stdlib/pmac.tl, share/txr/stdlib/save-exe.tl,
share/txr/stdlib/socket.tl, share/txr/stdlib/stream-wrap.tl,
share/txr/stdlib/struct.tl, share/txr/stdlib/tagbody.tl,
share/txr/stdlib/termios.tl, share/txr/stdlib/trace.tl,
share/txr/stdlib/txr-case.tl, share/txr/stdlib/type.tl,
share/txr/stdlib/vm-param.tl,
share/txr/stdlib/with-resources.tl,
share/txr/stdlib/with-stream.tl, share/txr/stdlib/yield.tl,
signal.c, signal.h, socket.c, socket.h, stream.c, stream.h,
struct.c, struct.h, strudel.c, strudel.h, sysif.c, sysif.h,
syslog.c, syslog.h, termios.c, termios.h, tree.c, tree.h,
txr.1, txr.c, txr.h, unwind.c, unwind.h, utf8.c, utf8.h, vm.c,
vm.h, vmop.h, win/cleansvg.txr: Extended copyright notices
to 2020.
|