| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
if get_line returns nil.
* stream.c (cat_get_line, cat_get_char, cat_get_byte): The catenated
stream read operations close an exhausted stream before popping
to the next one.
* txr.1: Document closing behavior of catenated streams.
|
|
|
|
|
|
|
|
| |
a different form as cat-streams.
* txr.1: Document cat-streams.
* tl.vim, txr.vim: Regenerated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(me_ret): Static function renamed to me_ret_aret.
Handles ret and aret macro expansion.
(eval_init): Initialize ap_s, ret_s and aret_s.
Re-register ret macro using ret_s and bind to me_ret_aret.
Register aret macro.
* txr.1: Documented aret.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (unique): New function.
(uniq): Becomes wrapper around unique.
* lib.h (unique): Declared.
* txr.1: Documented unique, and equivalence between uniq and unique.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
| |
* lib.h (func_n1ov, func_n2ov, func_n3ov): Declared.
|
|
|
|
| |
* lib.h (func_n0o): Declaration removed.
|
|
|
|
|
|
|
|
|
|
| |
not being recognized.
* genvim.txr (txr_braced_ident): New match kind, specifically
for a keyword.
(txr_bracevar): Bracevar region contains txr_braced_indent.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
| |
vi make_random_state.
* txr.1: Updated.
|
|
|
|
|
|
|
|
|
| |
state, we do not want to make the 8 calls to rand32 to
mix up the state; we need are making a straight copy.
* txr.1: Document the possibility that the seed object
is a random state. Document the platform-independence of the
integer seed.
|
|
|
|
| |
This generates better code for rand32.
|
|
|
|
|
| |
(rand32): Use inline function instead of macro.
I compared gcc -O2 output on Intel: no difference.
|
|
|
|
|
|
|
| |
* Makefile (COMPILE_C, COMPILE_C_WITH_DEPS, LINK_PROG): New
macro strings.
(dbg/%.o, opt/*.o, %.o, $(PROG), $(PROG)-dbg, conftest,
conftest2): These targets now use these commands.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
then that header is used when building in a separate directory,
instead of the config.h generated in that directory.
To fix this, we move config.h into a config/ subdirectory.
The $(top_srcdir)/config is not in the include search path
when buiding in a separate build directory.
While we are at it, let's move all the configure materials
generated by the configure script into config/.
* Makefile: include config/config.make at the top. Removing the
rule which asserts the existence of configuration based on
the presence of config.make.
(CFLAGS): Add $(conf_dir) to include search path with -iquote.
(notconfigured): New conditionally-defined target for producing
the error message when the build system is not configured.
(NL, DEP): New variables.
($(OBJS)): Make dependent on config/config.make and config/config.h
with help of DEP macro.
(opt/lex.yy.o, dbg/lex.yy.o): Express dependency using DEP.
(y.tab.h): Split off as a dependent on y.tab.c rather than
a co-target in the rule. The rule has a body to handle
the situation when y.tab.h is missing for some reason, but
y.tab.c already exists (and so won't be re-made, and so
y.tab.h won't be remade).
* configure: Require GNU Make 3.81 rather than 3.80.
(conf_dir): New variable.
(config_h, config_make, config_log): New variables. These are used in
place of config.h, config.make and config.log. Add conf_dir to
config.make variable.
|
| |
|
|
|
|
|
| |
* Makefile (SRCS): Only set if git is available.
(enforce): Fail if we don't have git.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (DEPGEN): New macro variable.
(OPT_OBJS, DBG_OBJS): Define with := assignment.
(OBJS): New variable.
(dbg/%.o, opt/*.o): Use -MMD and -MT options of gcc to generate
dependencies. Also use DEPGEN macro to rewrite each dependency
makefile's rule into a DEP_ variable assignment.
(DEP_INSTANTIATE): New macro variable.
(include dep.mk): Removed, replaced by eval hack that
includes all the .d files and instantiates the rule from
the DEP_ variable in each one.
(opt/lex.yy.o, dbg/lex.yy.o): We need to hard code the dependency
of these on y.tab.h, to force that header to generate.
(DEP_opt/lex.yy.o, DEP_dbg/lex.yy.o): New variables, related
to above.
(depend): Target removed.
* dep.mk: File removed.
* depend.txr: File removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables to remove the dependencies from the output.
(ABBREV2): No longer needed, removed.
(dbg/%.o, opt/%.o, %.o): Just use ABBREV instead of ABBREV2; it does
the right thing. Dependency of objects on config.make removed.
* dep.mk: Regenerated. Now provides variable assignments
in addition to rules, and each object is made dependent
on config.make.
* depend.txr: Adjusted to generate dep.mk in new format.
|
|
|
|
|
|
| |
cpio (use old ASCII format). This was unintentional.
On extract, use -m option to preserve timestamps,
like we do in INSTALL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (TESTS_OUT): We don't need to refer to top_srcdir.
Add the tst/ prefix to .out paths. Find must be used with -H
because tests is a symlink for out-of-tree build directories.
(tests/*): All target-specific assignments are moved to tst/tests/*
paths, and top_srcdir is no longer used in the right hand side
values.
(%.out): Becomes (tst/%.out).
(%.ok): need to compute .expected name from .out differently to
account for tst/ prefix.
(tests.clean): Just remove the tst directory.
(install-tests): Remove the tst directory first so test commands
are forced to run (though it is a dry run).
We no longer need to switch to top_srcdir to find the .txr
files, nor do we have to filter out .out files from the tests
tree. We no longer have to switch to top_srcdir in the recursive
make. Also, show the installation of tests using ABBREV3.
* configure: When configuring in a separate directory, symlink
the tests directory back to the source tree. Since there
are now three things being symlinked, rewrote that as a loop.
The recommendation to build in a separate directory is just a note, not
a warning.
|
|
|
|
|
|
|
| |
This adds superfluous commands to run.sh under make install-tests,
and is also inappropriate if a different txr binary is being tested.
(install-tests): Do not override top_srcdir in the recursive make
call; instead use -C to change to $(top_srcdir).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (VERBOSE): New variable.
(V, ABBREV, ABBREV1, ABBREV3): New macro variables.
(dbg/%.o, opt/%.o): Use V, ABBREV1 for concensed output.
($(PROG), $(PROG)-dbg, lex.yy.c, y.tab.c, %.out,
%.ok, INSTALL): Likewise, but use ABBREV.
(tests, GREP_CHECK, config.make, conftest.yacc,
conftest.clean): Use $(V) instead of @.
(tests.clean): Remove @; do not hide remove commands.
(INSTALL): Use $(V) instead of @ and use ABBREV3 to
provide condensed output.
(install): Use $(V) on $(PREINSTALL) so we don't see :
in the output.
(install-tests): Put $(V) on all steps.
|
|
|
|
|
|
|
|
|
| |
* Makefile (PROG): Variable removed, now set in config.make.
(all): Target now depends on $(BUILD_TARGETS) variable, set
in config.make.
* configure (debug_also) New variable.
(gen_config_make): Generate PROG and BUILD_TARGETS variables.
|
|
|
|
|
|
| |
Fix error message in toint wrongly identifying itself as tofloat.
* txr.1: Document handling of characters.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (in): New function.
* lib.h (in): Declared.
* txr.1: Documented in.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
| |
so that a nil set element is handled properly.
|
|
|
|
|
|
| |
right when $(2) is a wildcard like path/to/*.txr. It touches files in
the source tree to the timestamp of the argument after -r. Putting in
a shell loop to handle this.
|
|
|
|
|
|
|
|
|
|
| |
(TESTS_OUT): Depends on $(PROG).
(TESTS_OK): Does not dependon $(PROG).
(tests): Does not depend on tests.clean.
(retest): Target removed.
(%.out : %.txr): Generate to temporary file,
then move to .out.
(tests.clean): Remove $(TESTS_TMP).
|
|
|
|
| |
from git, and "make enforce" works from out of three builds.
|
|
|
|
|
| |
symbolically linked. Without this, tests which require txr to have
access to its library do not work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimized object files are under opt/ and debug
object files are under dbg/. The debug txr executable
is called txr-dbg.
* Makefile (CFLAGS): $(OPT_FLAGS) is omitted from CFLAGS,
so we can expand it where appropriate.
(ADD_CONF, EACH_CONF): New variables, used as macros.
(DBG_OBJS, OPT_OBJS): New variables.
(dbg/%.o, opt/%.o): New rules.
(all): New target.
($(PROG)-dbg): New target.
(clean): Remove the object directories with rm -rf.
Remove $(PROG)-dbg.
(depend): Pass $(OPT_OBJS) and $(DBG_OBJS) to depend.txr
Also: various target-specific assignments for object files
had to be split for rel and dbg.
* depend.txr: Updated to handle dbg/ or rel/ prefix on
object file paths.
* dep.mk: Regenerated.
|
|
|
|
|
| |
(tests): Add tests.clean as prerequiste, remove rm command.
(retest, tests.clean): New rules.
|
|
|
|
| |
intead of lazy assignment to set TXR_ARGS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rather than ./$(PROG). This way we can override the variable
from the command line if necessary.
(TESTS): Variable removed.
(TESTS_OUT, TESTS_OK): New variables, replace TESTS.
(tests): Prerequisites is now $(TESTS_OK), which are
actual timestamp files. Also depends on $(PROG).
(tests/%/%): Target specific assignments are now for .out
targets rather than .ok targets.
(%.out): New pattern target, made from half of previous %.ok rule.
(%.ok): Smaller rule, only performs diff between .out and .expected,
and touches the .ok stamp.
(%.expected): Bugfix: this rule now just copies .out to .expected,
and its prerequisite is %.out rather than %.txr.
Previously it tried to run txr, but it wouldn't use the correct
options, which depended on the target-specific assignments for
various .ok files.
(install-tests): Bugfix: in the "make -s -n" call use the new TXR
variable to specify the program's path. This fixes the issue that ./
was prepended to the txr commands, resulting in nonworking run.sh.
(txr-manpage.html): Use TXR to invoke txr rather than PROG.
|
|
|
|
|
| |
Also set MAKEFLAGS to disable all built-in rules.
The only one rule we used is .c to .o, so we provide it ourselves.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (lequal, gequal, lequalv, gequalv): New functions.
* lib.h (lequal, gequal, lequalv, gequalv): Declared.
* txr.1: Documented lequal and gequal.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
the lessv and greaterv functions instead of less and greater.
* lib.c (lessv, greaterv): New functions.
* lib.h (lessv, greaterv): Declared.
* txr.1: Document variadic nature of less and greater.
|
|
|
|
|
|
|
|
| |
* lib.c (sort_group): New function.
* lib.h (sort_group): Declared.
* txr.1: Documented.
|
|
|
|
|
|
| |
too early, before the loop which adjusts its value.
Restructuring this slightly to avoid duplicated code, by moving the
!first check later.
|
|
|
|
|
| |
Remove unessential variable last, and move the next variable
into loop scope.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Registered wrap and wrap* intrinsics.
* lib.h (wrap_star, wrap): Declared.
* txr.1: wrap and wrap* documented.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register new functions as intrinsics.
* lib.h (succ, ssucc, sssucc, pred, ppred, pppred): Declared.
* txr.1: Documented.
|
|
|
|
|
|
| |
* lib.h (where): Declaration updated.
* txr.1: Documented.
|
|
|
|
| |
* txr.1: Documented.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
then unless opt_compat is 100 or less, provide a more
consistent behavior, rather than splitting the string
into characters. This latter behavior was never documented.
* txr.1: Documented.
* dep.mk: Updated.
|
|
|
|
|
|
|
|
|
| |
for generic semantics.
* lib.h (max2, min2): Parameter names changed to avoid suggesting
that the operands are numbers.
* txr.1: Documentation for min and max updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(macro_form_p): Forward declaration added.
(me_opip): New static function.
(eval_init): Intern new symbols, register opip and oand macros
to me_opip function. Use chain_s and chand_s in registration
for chain and chand.
* txr.1: Document opip and oand
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
| |
Fix cut and paste problem: type_mismatch argument expression
referring to the C function cons rather than the intended
object seq.
|