| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
(clean, distclean, tests, install): Phony targets marked phony.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C structure contains obj_t * references, we should initialize
that C structure after allocating the cobj. If we initialize
the structure first, it may end up having the /only/ references
to the objects. In that case, the objects are invisible to the
garbage collector. The subsquent allocation of the cobj itself
then may invoke gc which will turn these objects into dust.
The result is a cobj which contains a handle structure that
contains references to free objects. The fix is to allocate
the handle structure, then the cobj which is associated with
that handle, and then initialize the handle, at which point it
is okay if the handle has the only references to some objects.
Care must be taken not to let a cobj escape with a partially
initialized handle structure, and not to trigger gc between
allocating the cobj, and initializing the fields.
|
|
|
|
| |
and @(freeform).
|
|
|
|
|
|
|
|
|
|
|
| |
(lazy_str): Fix for gc correctness: object from make_obj must be
completely intialized before any gc-triggering operation is invoked,
otherwise the garbage collector will be traversing an object
whose fields contain old garbage.
(lazy_str_force_upto): Off-by-one error. To force the object
up to index position N, means forcing up to length N+1.
This bug can make it look like a lazy string is much shorter
than it really is.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test suite exercises -c now.
txr.c (txr_main): If the script specified with -c is not terminated
by a newline, just add a newline. On the shell command line, it's a
nuisance to have to add the extra line before closing the quote.
It's also awkward in scripting, because the shell (or at
least Bash 3.0) does not produce a final terminating newline in command
substitution syntax like -c "$(cat file)". The last newline in
the file is trimmed, and has to be explicitly added in the script
itself, which is wrong in the case when the file is empty.
|
|
|
|
|
|
|
|
| |
semantics on the input stream to wide character input.
Also, reading a query the command line (-c) must
read bytes from a UTF-8 encoding of the string.
We introduce a new get_byte function which can extract bytes
from streams which provide it.
|
|
|
|
|
| |
use wide character functions so that there is no illicit
mixing. (But the goal is to replace this usage with txr streams).
|
|
|
|
| |
Added utf8_encode, utf8_decoder_init, utf8_decode.
|
|
|
|
| |
Cleaned up some more issues related to extended characters.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the changes are in the area of representing sets.
Also, a bug was found in the compilation of regex character sets:
ranges straddling two adjacent blocks of 32 characters were
not being added to the character set. However, ranges falling
within a single 32 block, or spanning three or more such blocks,
worked properly. This bug is not tickled by common ranges
such as A-Z, or 0-9, which land within a 32 block.
|
|
|
|
|
| |
so that the C library streams do the encoding. Once the program
is weaned from C library wide character stream I/O, this can go away.
|
|
|
|
|
|
|
|
|
| |
This is incomplete. There are too many dependencies on
wide character support from the C stream I/O library,
and implicit use of some encoding which may not be UTF-8.
The regex code does not handle wide characters properly.
Character type is still int in some places, rather than wchar_t.
Test suite passes though.
|
|
|
|
|
|
|
| |
in place, and thus having to pulling all conses into a big list.
TODO: avoid recomputing the hash function over the keys.
We could enhance cons cells with two more fields without using
additional storage.
|
|
|
|
|
| |
Now numbers and characters fit into a cell. We lose one more bit
from the range of numbers.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
unboxed. If the lowest bit of the obj_t * pointer is 1, then
the remaining bits are a number. A lot of assumptions are made:
- the long type can be converted to and from a pointer
- two's complement.
- behavior of << and >> operators when the sign bit is involved.
|
|
|
|
| |
due to use of boxed numbers for vector access.
|
| |
|
|
|
|
|
|
| |
is needed for pipes that terminate abnormally or return failed
termination. Pipe and stdio streams have an extra description field
so they are printed in a readable way.
|
| |
|
|
|
|
| |
Converted some directories to text files.
|
|
|
|
| |
by the integer constant 0 rather than a proper null pointer constant.
|
|
|
|
|
| |
bottom is unreliable due to the unpredictable allocation order of local
variables.
|
| |
|
| |
|
|
|
|
| |
permissions to the installation directories.
|
| |
|
|
|
|
| |
with .out files going to local tests/ tree.
|
| |
|
| |
|
|
|
|
|
| |
(Tested by cross-compiling txr on an x86 GNU/Linux system
to run on a MIPS-based GNU/Linux system).
|
|
|
|
| |
Fix possible use of uninitialized ch.
|
|
|
|
|
| |
Added Introduction headings to some major sections.
Improved exception handling intro.
|
| |
|
|
|
|
|
|
| |
Regexps can be bound to variables.
New freeform directive.
|
| |
|
|
|
|
| |
rather than separation.
|
|
|
|
| |
member, opts, in the lazy_string structure.
|
| |
|
|
|
|
| |
Bugfixes.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Lazy strings implemented, incompletely.
Changed string function to implicitly strdup; non-strdup
version changed to string_own. Fixed wrong uses of strdup
rather than chk_strdup.
Functions added to regex module to provide regex matching
as a state machine to which characters are fed.
|
|
|
|
|
| |
and used for matching. This Just Works because of
the way match_line treats variables.
|
| |
|
| |
|