| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
* lib.c (split_str): Fourth argument of search_regex is
Lisp boolean, so nil should be used to specify false.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Detect utsname and uname.
* sysif.c (utsname_s, sysname_s, nodename_s, release_s,
version_s, machine_s): New symbol variables.
(uname_wrap): New static function.
(sysif_init): Initialize new symbol variables.
Instantiate utsname struct type. Register uname_wrap
as uname intrinsic function.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Retracting the recent change to add the "t" mode when
opening non-binary streams on Cygwin, which arranges
for line ending conversion. This restores the Unix-like
treatment of text files on Cygwin, which is expected
of programs.
The Windows native version of TXR will do line ending
conversion thanks to the behavior of text streams in the
Cygnal fork of Cygwin.
* stream.c (format_mode): Only add the "t" option
on Cygwin if compatibility with 144 and 145 is selected.
* txr.1: Updated compatibility notes.
|
|
|
|
| |
* inst.nsi: delete sh.exe from bin directory, not root.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
| |
* LICENSE-CYG: Describe Cygnal situation and point
to Cygnal project. Also, treat the GCC runtime separately.
|
|
|
|
| |
* txr.1: Heading fixed from addrinfo to getaddrinfo.
|
|
|
|
|
|
|
| |
* socket.c (getaddrinfo_wrap): Initialize alist to null,
because getaddrinfo doesn't set it in the failure case!
Then, avoid calling freeaddrinfo for null pointer;
POSIX doesn't require that to work.
|
|
|
|
|
|
|
|
| |
* inst.nsi: the txr link now points to the executable
rather than the directory. This is because the executable
now does something meaningful: it brings up a console window
with a working REPL. The link to the directory is renamed
install-root.
|
|
|
|
|
|
| |
* inst.nsi: Delete sh.exe. If unable, it's okay to
leave it to the next reboot; it's not critical to
remove sh.exe.
|
|
|
|
|
|
| |
* inst.nsi: Copy cygwin1.dll from win subdirectory
rather than c:\cygwin\bin. The cygwin1.dll is placed
there prior to generating the installer.
|
|
|
|
|
|
|
|
|
|
|
| |
The Cygnal library uses cmd.exe for popen:
problem solved.
* Makefile (sh.exe): Target removed.
* cmdwrap.c: File removed.
* inst.nsi: Do not install sh.exe.
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (shell, shell_arg): New variables.
(sh): Use shell and shell_arg, rather than hard-coded
"/bin/sh" and "-c".
(stream_init): Initialize shell and shell_arg to
POSIX values. On Cygwin, call getusershell, and if it
reports cmd.exe, use that instead, and adjust shell_arg
to "/c". This will happen if the Cygwin DLL being used
is the Cygnal version.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the standalone image, we need a /bin/sh interpreter
for the sh and open-command functions to work. The / path
resolves to the installation directory, thanks to some
sysrooting logic in the Cygwin DLL. Thus, we just need
a sh.exe program in the bin directory, side by side
with txr.exe. This sh.exe program can translate the
"sh -c command" invocation to "cmd.exe /c command".
* Makefile (sh.exe): New target, built from cmdwrap.c.
* cmdwrap.c: New file.
* inst.nsi: Install sh.exe.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mode by default, such that "\r\n" is converted to "\n".
Cygwin's stdio streams aren't doing this. This is fine when
working in the Cygwin world, but not fine when we are making a
"native" Windows program with the help of the Cygwin DLL.
However, Cygwin supports the "t" mode letter in fopen, and
that forces a text mode which does the conversion.
* stream.c (format_mode): On Cygwin, if the mode isn't
binary, add the 't' letter to the normalized mode
string, unless compatibility <= 143 is requested.
* txr.1: Added compat notes.
|
|
|
|
|
|
| |
* txr.1: The big switch to Lisp evaluation throughut
the pattern language needs mentioning in the compatibility
notes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under the Cygwin port, if we are running in the Cygwin shell
enviroment, there is a HOME variable which contains a POSIX
path like /home/kaz. This path works fine and we use that.
If we are not running in the Cygwin environment, but running
as an application that uses the Cygwin DLL, then the HOME
variable is still defined, but the path doesn't resolve.
We must detect this, and fall back on the USERPROFILE
environment variable, which holds something like C:\Users\kaz.
* parser.c (get_home_path): New static function,
defined separately for Cygwin and other platforms.
(repl): Use get_home_path to determine home directory.
|
|
|
|
|
|
|
| |
* parser.c (repl): If home is nil, don't try to extract
UTF-8 string from histfile, which is also nil.
Use the UTF-8 pointer for subsequent checks, since it is
that pointer's use which is subject to those checks.
|
|
|
|
|
|
|
| |
* inst.nsi: New second license page informs about Cygwin.
The cygwin1.dll and cyggcc_s-1.dll objects are added
to the installer, placed into TXR's installation bin
directory.
|
|
|
|
|
|
|
|
|
|
| |
* LICENSE-CYG: New file.
* METALICENSE: Include a note about the use of Cygwin
in accordance with LGPL.
* txr.c (license): Use glob to iterate over all files in the txr
share directory which match the LICENSE* pattern.
|
| |
|
|
|
|
|
|
|
|
| |
* txr.1: Rewrote and rearranged sections that introduce
compound expressions. Introduced "bind expressions" as
a concept and applied throughout. Revised faulty
documentation of @(bind). Documented Lisp evaluation where
it now occurs.
|
|
|
|
| |
* match.c (v_cat): Use tleval_144 instead of txeval.
|
|
|
|
| |
* match.c (vars_to_bindings): Use tleval_144 instead of txeval.
|
|
|
|
| |
* txr.1: Introduce function with .coNP not .SS.
|
|
|
|
|
|
|
| |
* match.c (do_output_line): Use num(i) rather than
num_fast(i), because i is not guaranteed to be in
the fixnum range. It's less than c_num(max_depth),
which could be a bignum that is in the cnum range.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (h_var): Check modifier for integerp rather
than fixnump.
(h_skip, h_coll, v_collect): Substitute zero only for nil
values of various numeric parameters, not for values that are
not fixnump.
(v_skip): Likewise, and check success for integerp rather than
fixnump. Even if the code can't handle bignums, we need to
steer into that case so it can do he right thing and throw an
exception.
(freeform_prepare): Use weaker integerp type test rather than
fixnump on arguments, for same reason as in v_skip.
|
|
|
|
|
|
|
|
| |
* configure: Generate #define CONFIG_EXTRA_DEBUGGING 1 in
config.h header, rather than EXTRA_DEBUGGING.
* gc.c, gc.h, hash.c: Change references to EXTRA_DEBUGGING
preprocessor symbol to CONFIG_EXTRA_DEBUGGING.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gc.c (more): Under EXTRA_DEBUGGING, call breakpt()
here also, when it is detected that break_obj is
added to the free list for the firts time.
Print a message and backtrace using
VALGRIND_PRINTF_BACKTRACE.
(make_obj): Likewise, for an object that is pulled out
of the free list and returned.
(mark_obj, sweep_one): Print backtrace with Valgrind for
break_obj, in addition to calling breakpt().
|
|
|
|
|
| |
* gc.c (make_obj): Assert that the object we are pulling
from the free list is marked FREE.
|
|
|
|
|
|
|
| |
* lib.c (vector, copy_vec, sub_vec, cat_vec): Set the type
field of the object sooner. Do not malloc between obtaining
the object, and initializing it, because that could throw,
leaving an uninitialized object in the heap space.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gc.c (more): Only set the free_tail if the
new memory is being added to an empty free_list.
Otherwise free_tail is valid.
(make_obj): If we empty the free_list, then
reset the free_tail pointer, so it doesn't
continue pointing into the object we are returning.
(sweep): Remove defensive code which tries to reset
the free_tail in the empty free_list case,
but assumes that free_tail is correct in the non-empty
case.
|
|
|
|
|
|
|
|
|
|
| |
* gc.c (sweep_one): Don't check for gen == -1;
no reachable object can have that at this stage,
since mark flips -1 objects to gen 0.
(sweep): Do not clear freshobj_idx here;
completely revert the mark_markfresh code.
(gc): Clear freshobj_idx here., as before
the mark_makefresh hack.
|
|
|
|
|
|
|
|
|
|
| |
* syslog.c (syslog_mark): Remove incorrect stray code,
which passes a pointer to a non-gc-object to the gc_mark
function. This code was left behind in the change
which introduced struct syslog_strm,
git hash e44c113ee17c7cf15e8b1891f4d51ec03b16bc24
"Deriving streams from the same base",
July 29, 2015.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (tlist_k): New keyword symbol variable.
(tleval_144): New static function.
(h_skip): evaluate min and max arguments as Lisp.
(h_coll): Evaluate all numeric keyword arguments as
Lisp: :min, :max, :gap, :times, :maxtimes, :mintimes,
:chars.
(h_call): Evaluate function expression as Lisp.
(do_output_line, do_output): Evaluate n and m parameters
in @(modlast) and @(mod) as Lisp.
(v_skip): Evaluate min and max as Lisp.
(v_fuzz): Evaluate m and n as Lisp.
(v_freeform): Evaluate arguments as Lisp.
(v_next): Support new argument, :tlist, which is like
:list, but with TXR style evaluation. From now on :list
uses Lisp evaluation, unless compatibility is set to 143
or lower. Also, evaluate the :string argument as Lisp.
(v_collect): Evaluate all numeric keyword arguments as
Lisp: :min, :max, :gap, :times, :maxtimes, :mintimes,
:lines.
(v_output): Evaluate stream in :continue or :finish
expression as Lisp.
(v_load): Evaluate load target as Lisp.
(v_close): Evaluate stream argument as Lisp.
(v_call): Evaluate function expression as Lisp.
(syms_init): Initialize tlist_k variable.
* tests/007/except-1.txr: Use :tlist instead of :list,
since argument is a TXR list expression.
* tests/010/block.txr: Likewise.
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (eval_with_bindings, eval_progn_with_bindings):
Change static function names to the shorter tleval and
tleval_progn. The first and second arguments swapped around to
match the convention used by txeval.
(dest_bind, h_coll, tx_subst_vars, do_txeval,
extract_bindings, do_output_line, do_output_line, do_output,
v_next, v_collect, v_output, v_do, v_require, v_if, h_do):
Follow rename.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (op_defsymacro): Remove sym from the special
hash, unless compatibility 143 or lower is requested.
* txr.1: Document effects of evaluating defsymacro
if a global variable of the same name exists, and the
behavior in lexical scopes where sym is bound.
Added compatibility notes covering the code change.
|
|
|
|
|
|
|
|
| |
* match.c (h_coll, v_collect): Parse out :collect keyword
specification, using code borrowed from do_output.
Implement binding in collect loop.
* txr.1: Documented.
|
|
|
|
|
| |
* txr.1: Use indented paragraphs to replace the ad-hoc
introduction of keywords.
|
|
|
|
|
| |
* share/txr/stdlib/place.tl (defplace symbol-value):
Don't splice body into deleter syntax; must use plain unquote.
|
|
|
|
|
| |
* txr.1: Largely rewrote description of symbol-function,
symbol-macro and symbol-value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (unbound_s): New symbol variable.
(lookup_var): If a dynamic binding has the special sys:unbound
symbol as its value, then return nil, so the behavior
is as if there is no binding.
(makunbound): If the symbol exists in a dynamic environment,
then replace its value with sys:unbound, making it look
unbound.
(eval_init): Initialize unbound_s.
* lib.h (us_car, us_cdr): New inline functions.
* txr.1: New dialect notes under boundp.
Updated the makunbound documentation. Separated
makunbound documentation from fmakunbound and
mmakunbound. Added compatibility notes.
|
|
|
|
|
| |
* socket.c (dgram_destroy): Free the dgram_stream
structure too, not just its buffers.
|
|
|
|
|
|
|
| |
* mpi/mpi.c (mp_bit): If the digit index is beyond
the available digits in the number, report MP_NO rather than
accessing undefined digit material or beyond the array
entirely.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we ensure that the digits pointer of an uninitialized
mp_int is nulled out. The garbage collector could conceivably
encounter such an object, in which case mp_clear will then try
to free a garbage pointer. This could happen if an exception
is thrown out of numeric code due to low memory, interrupting
its execution, leaving behind an unfilled object produced
by make_ubignum.
* arith.c (make_ubignum): Perform minimal
initialization of the mp_int using new function.
* mpi/mpi.h (mp_init_minimal): New inline function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c (logand, logior, logxor): Use make_ubignum
to create an uninitialized bignum, because mp_and, mp_or, and
mp_xor expect argument c to be uninitialized, and clobber
it by initializing.
(comp_trunc): Use make_ubignum for b argument,
because mp_trunk_comp initializes it.
(lognot, logtrunc): Use make_ubignum for b, because
mp_trunc initializes it.
* mpi/mpi.c (mp_and, mp_or, mp_xor, mp_comp, mp_trunc_comp,
mp_trunc, mp_shift, mp_bit): Do not initialize the tmp that is
passed as argument b to mp_2comp, since that function
initializes it.
|
|
|
|
|
|
|
|
| |
This one is minor because there is only one syslog
stream.
* syslog.c (syslog_strm_ops): Use cobj_destroy_free_op rather
than cobj_destroy_stub_op.
|
|
|
|
|
| |
* parser.c (parser_destroy): Don't just clean up
the parser_t structure, free it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although we are garbage-collected, being able to clean up on
shutdown is nevertheless useful for uncovering leaks. Leaks
can occur, for instance, due to neglect to free out-of-heap
satellite data from objects that are reclaimed by gc.
This feature is long overdue.
* arith.c, arith.h (arith_free_all): New function.
* gc.c, gc.h (gc_free_all): New function.
* lib.c (init): Remove program name parameter and
redundant initialization of progname globl variable.
* lib.h (progname): Superfluous declaration removed.
This is already declared in txr.h.
(init): Declaration updated.
* regex.c (char_set_destroy): Do not check the static
allocation flag here; just destroy the object.
Do check for a null pointer, though.
(char_set_cobj_destroy): This cobj destructor now
checks the static flag of the char set object and
avoids freeing it. Thus our char set singletons are
left alone by gc, but our global freeing function
takes care of them.
(wide_cs): New static variable moved out of
wide_display_char_p to static scope.
(regex_free_all): New function.
* regex.h (regex_free_all): Declared.
* txr.c (progname): const qualifier and initializer removed.
(main): Ensure progname is always dynamically allocated, even
in the argv[0] == 0 case. Do not pass progname to init;
it doesn't take that argument any more.
(free_all): New static function.
(txr_main): Implement --free-all option.
* txr.h (progname): Declaration updated.
|