| 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Binary search tree nodes are being added as a basic heap data
type. The C type tag is TNOD, and the Lisp type is tnode.
Binary search tree nodes have three elements: a key, a left
child and a right child.
The printed notation is #N(key left right). Quasiquoting
is supported: ^#N(,foo ,bar) but not splicing.
Because tnodes have three elements, they they fit into TXR's
four-word heap cell, not requiring any additional memory
allocation.
These nodes are going to be the basis for a binary search tree
container, which will use the scapegoat tree algorithm for
maintaining balance.
* tree.c, tree.h: New files.
* Makefile (OBJS): Adding tree.o.
* eval.c (expand_qquote_rec): Recurse through tnode cells,
so unquotes work inside #N syntax.
* gc.c (finalize): Add TNOD to no-op case in switch; tnodes
don't require finalization.
(mark_obj): Traverse tnode cell.
* hash.c (equal_hash): Add TNOD case.
* lib.c (tnode_s): New symbol variable.
(seq_kind_tab): New entry for TNOD, mapping to SEQ_NOTSEQ.
(code2type, equal): Handle TNOD.
(obj_init): Initialize tnode_s variable.
(obj_print_impl, populate_obj_hash): Handle TNOD.
(init): Call tree_init function in tree.c.
* lib.h (enum type, type_t): New enumeration TNOD.
(struct tnod): New struct type.
(union obj, obj_t): New union member tn of type struct tnod.
(tnode_s): Declard.
* parserc.c (circ_backpatch): Handle TNOD, so circular
notation works through tnode cells.
* parser.l (grammar): Recognize #N prefix, mapping to
HASH_N token.
* parser.y (HASH_N): New grammar terminal symbol.
(tnode): New nonterminal symbol.
(i_expr, n_expr): Add tnode cases to productions.
(yybadtoken): Map HASH_N to "#N" string.
|
|
|
|
|
| |
* Makefile (clean): If it exists, remove the temporary run.sh
that is generated by the install-tests target.
|
|
|
|
|
|
| |
* Makefile (TXR_CFLAGS): Use := operator rather than += when
filtering out REMOVE_FLAGS, or else REMOVE_FLAGS are not
really removed, and we duplicate all the flags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (OBJS): New object file, chksums/md5.o.
* chksum.c (sha256_ensure_buf): Renamed to chksum_ensure_buf
and made generic so MD5 code can borrow it.
(sha256_stream, sha256): Call chksum_ensure_buf instead of
sha256_ensure_buf, passing in new length and hash name
parameters.
(md5_stream_impl, md5_buf, md5_str): New static functions.
(md5_stream, md5): New functions.
(chksum_init): Register md5-stream and md5 intrinsics.
* chksum.h (md5_stream, md5): Declared.
* chksums/md5.c, chksums/md5.h: New files.
|
|
|
|
|
|
|
|
|
|
|
| |
This test will misbehave on TXR without the previous fix;
it will not collect columns of data which keep the
corresponding rows items together.
* tests/002/variant, tests/002/variant.expected,
tests/002/variant.txr: New files.
* Makefile (TXR_ARGS, TXR_OPTS): Override for new test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/001/query-5.txr: New file.
* tests/001/query-5.expected: New file.
* Makefile (tst/tests/001/query-5.ok): Pass -B to txr for this
new test.
* tests/017/glob-carray.expected: Updated, because the glob
test globs over the contents of tests/001 directory.
* tests/017/glob-zarray.expected: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (OBJS): Add chksums/crc32.o.
* chksum.c (crc32_stream, crc32): New functions.
(chksum_init): Register crc32-stream and crc32 intrinsic
functions.
* chksums/crc32.c, chksums/crc32.h: New files.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* chksum.c, chksum.h, chksums/sha256.c, chksums/sha256.h: New files.
* lib.c (init): Call chksum_init.
* txr.1: Documented.
* LICENSE: Add SHA-256 copyright notice.
|
|
|
|
|
|
| |
* Makefile (distclean): distclean target for not-configured
state removes .tlo files by wildcard, including the old .tlo2
files that we used to generate once.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the build is being done in the source directory, allow
the configure script to be executed via path names other than
just ./configure, such as an absolute path.
Some distros use this.
* configure (build_in_srcdir): New variable.
(inode): New function.
Rather than checking whether "$source_dir" is ".", we test
whether they are the same inode. If they are the same, we now
also set the build_in_srcdir variable in addition to
generating the usual warning.
(gen_config_make): Propagate the build_in_srcdir into
config.make.
* Makefile: use the build_in_srcdir variable from config.make
to determine whether we are building in the source directory,
rather than relying on top_srcdir being blank.
|
|
|
|
|
|
| |
* Makefile (dbg/%-win.o, opt/%-win.o): Don't pass
CONFIG_WIN_MAIN=1 preprocessor symbol; it's not referenced
anywhere, and never has been.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the defvar bugfix in the previous commit, the only
differences between .tlo and .tlo2 files are the names of
a few gensyms here and there. In other words, they are
identical code; therefore, there is no point in compiling
them.
* Makefile (STDLIB_TLOS2): Variable removed.
(%.tlo2): Implicit rule removed.
(stage1 stage2): Phony targets removed.
(all): Directly depends on $(STDLIB_TLOS) without stage1
intermediary.
(clean-tlo): Don't remove $(STDLIB_TLOS2).
|
|
|
|
|
|
|
|
| |
* Makefile (install): Drop the $(top_srcdir) prefix from
share/txr/stdlib materials. This fails for the .tlo files
which are only found in the build directory, not the source
directory. The .txr and .tl files are found in both, thanks
to symlinks; for those it works either way.
|
|
|
|
| |
* Makefile (MPI_OBJ_BASE): remove mplogic.o.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* LICENSE, LICENSE-CYG, METALICENSE, Makefile, args.c, args.h,
arith.c, arith.h, buf.c, buf.h, cadr.c, cadr.h, combi.c,
combi.h, configure, debug.c, debug.h, eval.c, eval.h, ffi.c,
ffi.h, filter.c, filter.h, 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, 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/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/path-test.tl,
share/txr/stdlib/place.tl, share/txr/stdlib/pmac.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, 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 line to 2018.
|
|
|
|
|
| |
* Makefile (TXR_LDFLAGS): Fix use of wrong assignment operator
which clobbers the previous assignment of $(LDFLAGS).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (opt/txr.o, dbg/txr.o): Set up TXR_REL_PATH
preprocessor symbol on command line which specifies the
hard installation path derived from the configure prefix.
* txr.c (get_self_path): The fallback implementation simply
returns TXR_REL_PATH. This will work if in fact the executable
is installed at that path. What it means is that the build of
TXR which uses this fallback get_self_path will not support
relocation: the installation cannot be moved to another
directory, yet still find its supporting files. This is
better than what we are replacing: not working even in the
original installation directory, if not invoked by an absolute
path.
|