| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
| |
* txr.1: Substantially rewrote incorrect and incomplete
description of merge directive.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: The term "query language" is retired; "pattern
language" is used everywhere. The script argument can be TXR
Lisp or TXR, so is referred to as "script-file" in all
contexts where it could be either. Clarifications are added in
a few places that the script could be Lisp or that some
wording only applies when the script is TXR. Removing
incorrect, obsolescent wording which specifies that the
leading exclamation mark convention is honored in a file name
argument.
|
|
|
|
|
|
| |
* txr.1: Under INTERACTIVE LISTENER, add remarks that
using the exit function, or raising a fatal signal,
will prevent the history from being saved.
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: Revise the synopsis so that it doesn't insinuate
that the query-file or data-file arguments are mandatory.
A formatting issue with the brackets around options is
fixed. Under ARGUMENTS AND OPTIONS document that if
no arguments are present, the interactive listener
is launched. Under INTERACTIVE LISTENER, mention that
not only does the -i option run the listener, but so does
txr invocation with no arguments.
|
|
|
|
|
| |
* txr.1: Fix plural subject "lines" paired with singular
verb "has".
|
|
|
|
|
| |
* txr.1: Fix sentence talking about two functions,
respectively, but just one function as its subject.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Staci-blowing test case:
(defstruct foo nil bar)
(mlet ((f (lnew foo bar (not f.bar))))
(prinl f.bar))
* struct.c (lazy_struct_init): Do not flip the lazy flag to zero
here. The problem is that it's being done after the
funcall(so->slot[0]), and so the struct is still marked for
lazy initialization while that function is running.
We could detect the circularity (as done in the force function) but that
would create inflexibilities in lazy struct initialization.
(check_init_lazy_struct): Flip the lazy flag to zero in
this function before calling lazy_struct_init.
* txr.1: Document behavior of struct being freely accessible during
lazy initialization.
|
|
|
|
| |
* txr.1: list* symbol was typeset as meta.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (time_parse_s): New symbol variable.
(tm_to_time_struct): New static function,
based on code moved out of broken_time_struct.
(broken_time_struct): Bulk of code replaced with call to
tm_to_time_struct.
(time_struct_to_tm): New parameter, strict. Indicates
whether nils in time struct are converted to zeros,
or whether they trigger errors.
(time_string_meth): Specify strict conversion
of argument time struct to to struct tm when
calling time_struct_to_tm.
(time_parse_meth): New static function.
(time_init): Initialize time_parse_s symbol variable;
add time-parse static slot to time struct;
initialize slot with new method.
* txr.1: Document time-parse method.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (time_string_s): New symbol variable.
(time_fields_to_tm, time_struct_to_tm): New static functions.
(make_time_impl): Replace bunch of code with call to
time_fields_to_tm.
(time_string_meth): New static function.
(time_init): Initialize time_string_s. Add time-string
static slot to time struct. Register time-string
method.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Test for strptime.
* eval.c (eval_init): register time-parse intrinsic.
* lib.c (time_parse): New function.
* lib.h (time_parse): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
| |
* txr.1: Heading fixed from addrinfo to getaddrinfo.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* txr.1: Introduce function with .coNP not .SS.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* txr.1: Document that txr-path includes slash.
Fix two incorrect examples which have an extra slash.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (sysroot_init): Add slash to stdlib_path.
(sysroot_compat_fixup): Replace user-visible stdlib
variable with a path that doesn't have a slash,
if compatibility is 143 or lower.
(compat): Call sysroot_compat_fixup.
* lisplib.c (place_set_entries, ver_set_entries,
ifa_set_entries, txr_case_set_entries,
with_resources_set_entries, path_test_set_entries,
struct_set_entries, with_stream_set_entries, hash_set_entries,
except_set_entries, type_set_entries, yield_set_entries,
sock_set_entries, termios_set_entries): Remove slash from
format string since the directory includes it.
* txr.1: Added note under stdlib about the slash,
and also an entry COMPATIBILITY.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
| |
* txr.1: Insufficient parenthesis nesting in
:vars syntax with initializer.
|
|
|
|
|
|
|
|
|
| |
* match.c (v_output): Use txeval on the destination only if
compatibility is 142 or lower, or it is a meta expression
(so that @var and @(expr) still work without having to use
the compatibility option).
* txr.1: Documented and put in compatibility notes.
|
|
|
|
| |
* txr.1: reqm was written instead of remq*.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (from_list_s): New symbol variable.
(make_like): Handle a COBJ. If it's a structure with a
from-list method, then use it, otherwise the
default handling applies of returning the list.
(obj_init): Initialize from_list_s.
* txr.1: Documented.
|
|
|
|
|
|
|
|
| |
* txr.1: Removing "Functors", "Equality Substitution", "Custom
Pretty-Printing" and "Sequence Operations on Structures"
paragraphs. Adding major section "Special Structure
Functions" under which the special functions are described
with syntax headings.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (ldiff): Rather than checking specifically for
strings and vectors to apply the special case behavior
(comparison using equal), test specifically for lists and
apply the traditional behavior. Every other object,
not just strings and vectors, gets the altered behavior.
* txr.1: Changed text in TXR Lisp introduction which touches
on ldiff, and wording fix under ldiff.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Struct objects can now define methods car, cdr and nullify.
With these, they can participate in operations on sequences.
* eval.h (car_s, cdr_s): Declared.
* lib.c (nullify_s): New symbol variable.
(car, cdr): Implement for struct objects via, respectively,
their car and cdr methods.
(tolist): Handle objects by mapping through identity.
(nullify): Implement for objects optionally: if an object
is a struct with a nullify method, use it, otherwise go
through default case of just returning the object.
(empty): Implement for objects that have nullify method.
(obj_init): Initialize nullify_s.
* struct.c (maybe_slot): New function.
* struct.h (maybe_slot): Declared.
* txr.1: Documented car, cdr and nullify method
convention.
|
|
|
|
|
|
|
|
|
| |
* struct.c (print_s): New symbol variable.
(struct_init): Initialize print_s.
(struct_inst_print): If pretty-printing, try to look
up object's print method and use it.
* txr.1: Documented pretty-printing via print method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Going forward, the "!command" and "$dir" are no longer
recognized, except with the backward-compatibility -C option.
The "-" string denoting standard input is only recognized from
the command line, not in the @(next) directive; and "-" cannot
be used in @(output) to denote standard output.
The main problem is that these are hacks which intrude into
the namespace. (What if a file is named "-", or begins with
"!" or "$"?) Secondly, they are possible security holes.
These prefixes are recognized even in computed strings, like
"@(next var)" where var contains "!command".
* Makefile (tst/tests/002/%): Run tests in this directory
with the -C 142 option in TXR_OPTS, because they use the !
mechanism.
* match.c (complex_open): New argument, from_cmdline,
indicating whether the file name came from the command
line or is internal. Function now only treats "-" as denoting
standard input, if that came from the command line.
The "!" and "$" prefixes are only recognized in compatibility
with 142 or earlier.
(v_next): Suppress old strategy of handling string sources by
pushing them to the file list to let match_files open them.
This is now done only under 142 compatibility. Instead, open
directly, produce the list, and recurse into match_files
with ready data. This is not only simpler, but also prevents
"-" from being recognized in @(next), because complex_open
is invoked directly, and the from_cmdline argument is
specified as nil.
(v_output): Don't rely on "-" denoting standard output; rather
use the stream directly, which can be passed to complex_open.
Pass nil to the new from_cmdline parameter of complex_open,
so "-" isn't recognized.
(open_data_source): Pass t for the from_cmdline parameter
of complex_open, to have "-" recognized as denoting
standard input.
* txr.1: Removed documentation referring to !, and use of -
in the @(next) and @(output) directives. Added
notes to COMPATIBILITY section.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (byte_oriented_k): New keyword symbol variable.
(struct stdio_handle): New member, is_byte_oriented.
(stdio_get_prop): Retrieve the value of is_byte_oriented when
the :byte-oriented property is inquired.
(stdio_set_prop): Map :byte-oriented to the is_byte_oriented
flag.
(stdio_get_char): Do not decode UTF-8 if is_byte_oriented is
set; just read one character.
(make_stdio_stream_common): Initialize is_byte_oriented to 0.
(stream_init): Initialize byte_oriented_k.
* txr.1: Document :byte-oriented property, along
with some clean-up and clarification in the description of
properties.
|
|
|
|
|
|
|
|
| |
* checkman.txr (check-cblk): New pattern
function, hooked into main scan.
* txr.1: Fixed four instances of .cblk closed
by .cblk instead of .cble.
|
|
|
|
|
|
| |
* txr-embedded-arg.txr: New file.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (sysroot_init): Don't print "unable to calculate
sysroot" error message in the fallback case, and
use the absolute path of the executable directory
as the sysroot in this case.
(txr_main): Define static area prefixed by @(txr): header. If
a string is present in this data area then process it as an
argument. Treat the *args* variable carefully. If we use the
stored string as the argument, save the args in orig_args
variable, then later bind *args* to that. In the -e, -p and
related options processing, we bind *args* to the original
list so args are available to the expression being evaluated.
If the expression mutates *args* then we keep the mutated args
whether or not we are processing the stored string.
* txr.1: Documented in new sction, STAND-ALONE
APPLICATION SUPPORT.
|
|
|
|
|
|
|
| |
* txr.c (dirname): New static function.
(sysroot_init): Register txr-path variable.
* txr.1: documented txr-path.
|
|
|
|
|
|
|
| |
* parser.l (grammar): Recognize {WS}* between @
and ; (or the legacy #) in comments.
* txr.1: Documentation updated.
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (remove_path): New parameter, throw_on_error.
(stream_init): Update registratino of remove_path intrinsic.
* stream.h (remove_path): Declaration updated.
* txr.1: Updated remove-path documentation to describe
throw-on-error-p parameter.
|
|
|
|
|
| |
txr.1: It wasn't documented that expr in @(next expr)
can produce a stream.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|