| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date. Fixed repeated
word in documentation under env-hash.
* share/txr/stdlib/ver.tl: Bumped from incorrect 243
value to 245.
|
|
|
|
|
|
|
| |
* tests/018/chmod.tl: Certain chmod test cases no longer work
on Cygwin. The issue is the chmod system call. It produces
completely nonsensical results in some cases. We disable
these test cases on Cygwin.
|
|
|
|
|
| |
* linenoise.c (scan_match_rev, scan_match_fwd): The value of
s[i] must be captured in a wchar_t, not int.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* socket.c: Add missing #include <netinet/in.h>.
* tests/017/glob-carray.tl, tests/017/glob-zarray.tl:
Use same definition for struct glob as Cygwin.
Both are of BSD origin.
* tests/017/realpath.tl: Do not test on Android.
* tests/common.tl (os-symbol): Detect Android and return :android.
(libc): Handle :android.
|
|
|
|
|
|
|
| |
* configure: Move how-to-disable-PIE check below plaform
detections, where we know whether we have Android or not. On
Android, we can't disable PIE; non-PIE executables are not
supported. Let's cross our fingers things work.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* configure (need_darwin_c_source): Renamed to darwin_target.
|
|
|
|
|
|
|
|
| |
* configure (diag_flags): Remove the -Wold-style-declaration
option. It is not useful, unlike -Wold-style-definition;
it warns agains some unspecified old style usages, like
storage class specifiers not being first. Moreover, clang 10
does not recognize this option and complains.
|
|
|
|
|
|
|
|
|
|
|
| |
The code will continue to stick to C90, but requesting C90
compatibility from GCC may break for downstream users in some
environments that don't support C90 in their header files.
* configure (lang_flags): Remove -ansi option from here.
(usage): Help text for maintainer mode updated.
(mainline): Add -std=c++98 to the front of lang_flags if
compiling as C++, -std=c90 in maintainer mode, else -std=c99.
|
|
|
|
|
|
|
| |
* configure: When we detect we are using C++, we filter out
certain C-only compiler options. TO that list, we must add a
pattern that gets rid of the recently added
-Wold-style-definitions and -Wold-style-declarations.
|
|
|
|
|
|
|
|
|
|
| |
* configure: The new logic for detecting type sizes introduced
in October, replacing the old nm-based trick, doesn't work
with C++. An anonymous structure is being used to define an
object with linkage: we fix that by giving the structure a tag
name which be. C++ also doesn't like a one-character string
literal like "\n" being used to initialize a char [1] array,
so we make it [2].
|
|
|
|
|
| |
* lex.yy.c.shippped (YY_DECL): Fix some bad indentation, most
likely caused by using a mixture of tabs and spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c (int_flo): On 64 bit, we incorrectly handle the positive
floating-point values which correspond to (expt 2 63) and (expt 2 64).
This is because in the range check which detects whether a double value
lands into the cnum or ucnum range, the 64 bit INT_PTR_MAX and
UINT_PTR_MAX have no exact equivalent in the double type and are being
converted to double values which are greater. That then causes the range
check to incorrectly include double values that are actually out of
range for the conversion to the cnum or ucnum type, causing bogus
values. The quickest fix would be to use < comparison for a half-open
range, but that sacrifices two double values on 32 bit, unnecessarily
sending them to the text-based conversion code. So instead, let's
subtract margins from the range constants on 64 bit.
|
|
|
|
|
|
| |
* configure (diag_flags): Add warning options agains defining
an old style C function, and against obsolecent features in
declarations.
|
|
|
|
|
|
|
|
|
| |
* match.c (do_output_line, do_repeat, v_deffiler): Replace
func_n1(cdr) and func_n1(rest) with cdr_f.
* eval.c (eval_init): Replace func_n1(car) and func_n1(cdr)
with car_f and cdr_f. Should have been done in 2011 when
this was done for the registrations of car and cdr.
|
|
|
|
| |
* share/txr/stdlib/quips.tl (sys:%quips%): New entry.
|
|
|
|
|
|
| |
* mpi.c (s_mp_ispow2): Delay call to s_highest_bit until that
value is actually needed. Perhaps the compiler does the code
motion, but let's write the code that way.
|
|
|
|
|
|
|
|
| |
* lib.c (obj_print_impl): Drop the complicated logic for
printing a character as 2, 4 or 6 hex digits. All characters
that must print using the #\x notation are jus printed using
the ~X format specifier with no precision or leading zeros,
which will use just as many digits as are required.
|
|
|
|
| |
* share/txr/stdlib/quips.tl (sys:%quips%): Add new quips.
|
|
|
|
| |
* time.c (timegm_hack): Use two space indentation, not four.
|
|
|
|
|
|
|
|
| |
* time.c (setenv, unsetenv): Removed.
(timegm_hack): Now defined earnestly only if HAVE_SETENV is
true, otherwise a stub is defined that throws an error.
(time_init): Don't register make-time-utc intrinsic if we don't
have a timegm function.
|
|
|
|
|
|
|
|
| |
* sysif.c (setenv_wrap, unsetenv_wrap): Now surrounded
with #if HAVE_SETENV ... #endif, an existing feature detection
macro.
(sysif_init): Only register setenv and unsetenv functions
if HAVE_SETENV is true.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sysif.c (env_hash): Function renamed to get_env_hash and a
static variable named env_hash introduced.
Function returns a previously allocated hash table, if
it exists, except in compat mode.
(getenv_wrap): Stash the result into the hash also.
(setenv_wrap): Keep the hash up-to-date with the action of
setenv.
(unsetenv_wrap): Also delete from the hash.
(sysif_init): Protect the env_hash variable from gc.
* txr.1: Documented, with compat notes.
|
|
|
|
|
|
| |
* txr.1: The env function actually returns a cached list.
Spell out that the function is not required to construct a new
list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (env_list): Static variable removed; now appears in
sysif.c
(env): Function removed; now in sysif.c.
(obj_init): Don't gc-protect env_list here any more.
* lib.h (env): Declaration removed.
* match.c: Must include "sysif.h" now for env.
* sysif.c (env_list): Static variable moved here.
(env): Function moved here.
(sysif_init): env_list gc-protected here.
* sysif.h (env): Declared.
|
|
|
|
|
|
|
| |
* struct.c (umethod_fun, umethod_args_fun): The env function
is being used as an object, passed to the ~a conversion
specifier of the formatter. The correct argument is the sym
variable.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
* time.c (env_list): The env_list variable is static in
lib.c. The idea here was that since we modified the
environment with setenv, we should invalidate the env hash
which stores a cached copy of it. However, the setenv library
function that is exposed to programs neglects to do this,
which is a much larger issue. Let's delete the assignment to
env_list and deal with the whole issue later.
|
|
|
|
|
|
| |
* eval.c (map_common): Save the leftmost arg in a local
variable, and refer to that in the make_like call.
The bug here is that the args get zapped to nil.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/compiler.tl (%tlo-ver%): Bump minor version
from 0 to 1. Because the major version doesn't change, these
files will be loaded by TXR 216 through 243, because those
versions only look at the major number. The upcoming 244 will
continue to do that. What the minor number increase indicates
is that the compiled files do not use the deprecated movi
instruction group. If a future version of TXR removes the
instructions from the VM, it will then insist on only loading
version 5 files if the minor number is at least 1. Version 5.0
files will be rejected, as will version 4 or lower.
|
|
|
|
|
| |
* txr.1: TXR 216 bumped the compiled file version from 4 to 5,
but this was not documented.
|
|
|
|
|
| |
* rand.c (make_random_state): Use time_sec_nsec to obtain
a time with nanoseconds, instead of time_sec_usec.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Test for clock_gettime, generating
HAVE_CLOCK_GETTIME symbol in config.h.
* time.c (time_sec_nsec): New function.
(time_init): time-nsec intrinsic registered.
* time.h (time_sec_nsec): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* rand.c: Refer to "WELL512a" in comment, not "WELL 512".
* txr.1: Replace "WELL 512" with "WELL512a" everywhere.
|
|
|
|
|
|
| |
* tests/013/well512a.tl: New file.
* tests/013/well512a.expected: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rand.c (rand32_bug): New static function formed by
renaming the original buggy rand32.
(rand32_good): Copy of rand32 with two bugfixes. The term
involving variable r2 must be only left shifted by 28 bits,
and not xor-ed with the original value. The order of
operations is wrong in the term that contains the & operation.
(rand32): New static function pointer variable, serving
as the rand32 function. Points to rand32_good by default.
(rand_compat_fixup): Test for 243 or lower compatibility,
under which rand32 is made point to rand32_bug. This is done
before the call to make_random_state for replacing
*random-state*, which has to use the old function.
* txr.1: compat note added.
* tests/013/maze.expected: Updated.
|
|
|
|
| |
* txr.1: Fix out-of-order compatibility 247 and 242 entries.
|
|
|
|
|
|
| |
* METALICENSE: Include a paragraph explaining the special
circumstances regarding the shipping the Bison-generated
y.tab.c and y.tab.h files.
|
|
|
|
| |
* share/txr/stdlib/quips.tl (sys:%quips%): Add four quips.
|
|
|
|
|
|
|
|
|
| |
* regex.c (trim_left, trim_right): New static functions.
(regex_init): New intrinsics registered.
* tests/015/trim.tl, tests/015/trim.expected: New files.
* txr.1: Documented.
|
|
|
|
| |
* share/txr/stdlib/quips.tl (sys:%quips%): Add two quips.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add this to your .txr_profile startup file.
* lisplib.c (quips_instantiate, quips_set_entries): New static
functions.
(lisplib_init): Register autoloading of quip.
* share/txr/stdlib/quips.tl: New file.
* txr.1: Documented.
|
|
|
|
|
|
|
| |
* configure: When calculating the cmdline variable from the
positional parameters, there are more shell-special characters
that require quoting: parentheses, braces, redirection
operators, the semicolon and the hash comment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/compiler.tl (comp-atom): Remove the special
case for small fixnums and characters which encodes their
value in a movi instruction as an immediate operand. This
means that now these operands go into D registers, like all
other literals.
* share/txr/stdlib/vm-param.tl (%imm-width%): Remove this
constant, reprensenting the maximum bit width of an immediate
operand.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The movrsi, movrmi and movrbi (move immediate {small, medium,
big} to register) instructions are becoming deprecated.
The reasoning is that character and fixnum operands can just
go into a VM descriptor's data vector (D registers). Then they
can be referenced directly without wastefully issuing an extra
instruction.
* genvmop.txr: Add a deprecated comment next to the enum
constants of deprecated opcodes.
* share/txr/stdlib/asm.tl (oc-base): Add Boolean property
which indicates that an opcode is deprecated. This is a static
class variable, defaulting to nil in the base class.
(op-movrsi, op-movsmi, op-movrbi): Override base class
deprecated property with a true value.
* vmop.h: Regenerated.
|
|
|
|
|
| |
* genvmop.txr: :vars removed from @(repeat) syntax.
It is no longer required as of the previous commit's fix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following does not work and is fixed here:
@(output)
@(repeat)
@{lisp-expr ...}
@(end)
When a Lisp expression occurs in a braced expansion
syntax, it is not not traversed to find variables.
* parser.y (extract_vars): Treat the second element of a
sys:var as a Lisp expression, and find variables. Don't do
this in 128 or older compatibility mode, because then that is
a TXR expression.
* y.tab.c.shipped: Regenerated.
|
|
|
|
|
|
|
|
|
| |
* 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.
|