| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c: New intrinsic functions "stat" and "prop".
* stream.c: Include <sys/stat.h> if we have it.
(w_stat, statf): New functions.
(val dev_k, ino_k, mode_k, nlink_k, uid_k,
val gid_k, rdev_k, size_k, blksize_k, blocks_k;
val atime_k, mtime_k, ctime_k): New sybol variables.
(stream_init): Intern new keywords symbols.
* stream.h (statf): Declared.
* txr.1: prop documented. Stub for stat created.
|
|
|
|
|
|
|
|
| |
* lib.c (numneqv): New function.
* lib.h (numneqv): Declared.
* txr.1: New function documented.
|
| |
|
|
|
|
|
|
| |
When a match for the @(last) material occured at the end of data,
c->data was being mistakenly set to nil rather than t before breaking
out of the loop, wreaking havoc.
|
| |
|
|
|
|
| |
descriptions should be referred to in angle brackets.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hash.c (make_hash): Likewise.
* lib.c (assq): Renamed to assql for consistency.
(aconsq_new): Renamed to aconsql_new.
(aconsq_new_l): Renamed to aconsql_new_l.
(alist_remove_test): Use equal rather than eq. Association lists
use equal equality by default.
(alist_nremove): Use memqual rather than memq.
(alist_nremove1): Use equal rather than eq.
(merge): Bugfix: unnecessary consing caused by using append
instead of nconc on list pieces that are already destructively
chopped up. This has implications for the efficiency of sort
over lists!
(multi_sort_less): Implement key functions.
(multi_sort): Interface change: arguments rearranged, and new
argument to specify key functions.
* lib.h (assoc, assq, assql, aconsq_new, aconsq_new_l): Declarations
renamed.
(multi_sort): Declaration updated.
* txr.1: Documented alist library, list sorting and completed
documenting lazy library.
* txr.vim: multi-sort highlighted.
|
|
|
|
| |
with new headings.
|
|
|
|
| |
the whole binding.
|
| |
|
|
|
|
| |
except directory-related ones.
|
| |
|
|
|
|
|
|
|
| |
apply field formatting to the object not only if a nonzero width has
been specified, but also if precision has been specified.
* txr.1: documented stream global variables and format.
|
|
|
|
|
| |
expression syntax, resulting in (set ...) syntax being regarded as
assignment (due to another recent change).
|
| |
|
|
|
|
|
|
|
| |
of throwing it away.
(expand): Recurse into expand_place for (set ...) forms.
* txr.1: Documented eval.
|
| |
|
|
|
|
| |
sorted lists are returned, rather than a list of zipped tuples.
|
|
|
|
|
| |
list of the functions is empty, the left item is considered less
than the right, thereby preserving the order.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.h (mapcarv): Declaration added.
(eval_init): New intrinsic multi-sort registered.
* lib.c (multi_sort_less): New static function.
(multi_sort): New function.
* lib.h (multi_sort): Declared.
* txr.1: stub section added.
|
|
|
|
|
|
|
|
|
|
|
|
| |
intrinsics. open-pipe is now deprecated but stays for backward
compatibility as a synonym for open-command.
* stream.c (open_pipe): Renamed to open_command.
(open_pipevp): Renamed to open_process.
* stream.h (open_pipe, open_pipevp): Declarations updated.
* txr.1: Documentation headings updated.
|
|
|
|
| |
as first element of argv.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
does not have for or exec. We could use CreateProcess and CreatePipe,
et cetera, but it won't buy us anything because the whole point
of this function is to improve the argument passing, and CreateProcess
takes a single command line string, not too different from popen.
* stream.c (pipev_close, make_pipev_stream): Surrounded with
HAVE_FORK_STUFF ifdef.
(pipe_close): Choice of close strategy conditional on HAVE_FORK_STUFF.
(open_pipev): Conditionally defined in two ways now.
(win_escape_arg, win_make_cmdline): New static functions.
|
|
|
|
| |
Produces HAVE_FORK_STUFF in config.h.
|
|
|
|
| |
* stream.c (w_opendir): Likewise.
|
|
|
|
| |
return values of ut8_dup_to.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that popen accepts a complete command. We need something which
accepts a program name, and a list of arguments, so that
we don't have to assemble together a correctly quoted string.
popen needs an alternative interface resembling execvp.
* eval.c (eval_init): New intrinsic registered, open-pipe-args.
* stream.c (struct stdio_handle): New member, pid.
(stdio_stream_print): Print the pid, if it is nonzero.
(pipevp_close): New close function.
(pipe_close): If h->pid is nonzero, it's a new-style pipe, which
must be closed with pipev_close.
(make_stdio_stream, make_pipe_stream): Initialize new stdio_handle
member to zero.
(make_pipevp_stream): New static function.
(open_pipevp): New function.
* stream.h (open_pipevp): Declared.
* txr.1: open-pipe-args added to stub section heading.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(dir_tables_init): Register dispatch for repeat to v_collect
function.
* parser.y (collect_repeat): New nonterminal symbol.
(clause): Removed repeat_clause error case because that now clashes
with the syntax in collect_clause.
(collect_clause): Repeat syntax implemented, with help of
collect_repeat.
(out_clause): Error case for collect_clause removed due to
syntactic clash.
* txr.1: Added mention of @(collect :vars nil) and documented
@(repeat) as the shorthand.
|
|
|
|
|
|
| |
configure step; send it to /dev/null.
* txr.spec: Adding specfile for building RPMs.
|
|
|
|
|
|
|
|
|
|
| |
arguments to plus, so that the from object is on the left. This
change was introduced in a commit on 2012-02-14, causing
character ranges to break due to bug that addition did not
commute for char + fixnum. Although the previous commit fixed
the regression, it's still good to have the object on the
left in case there are some future data types in case there
is ever some form of addition which does not commute.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* configure: MPI is now extracted and patched in the build directory,
not in the source directory.
* Makefile (CFLAGS): Refer to mpi headers relative to current
directory, not $(top_srcdir).
(repatch): Run MPI repatching steps in correct directory.
(clean): Remove extracted MPI from build directory.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
| |
(char_set_addr_str): New function.
(char_set_compile): Use char_set_addr_str to
add spaces to set.
(init_special_char_sets): Use char_set_addr_str to
add spaces to set. Bugfix: word_cs, cword_cs wrongly initialized.
(regex_init): Removed reference to regex_space_chars.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(regterm): REGTOKEN production factored out to regtoken.
(regclass): Reverted prior commmit's changes.
(regclassterm): Reverted prior commit, removing REGTOKEN
production for character classes, and introduced a regtoken
production. So now the keyword symbols are part of the
character class abstract syntax.
(regtoken): New production rule.
* regex.c (regex_space_chars): Converted to internal linkage.
(char_set_compile): Handle token keywords in character class
abstract syntax.
* regex.h (regex_space_chars): External declaration removed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (init): Call regex_init.
* parser.l: return new REGTOKEN kind.
* parser.y (REGTOKEN): New token type.
(REGTERM): Translate REGTERM to keyword.
(regclass): Restructured to handle inherited nodes as lists.
(regclassterm): Produce $$ as list. Add handling for REGTOKEN
occurring inside character class by expanding it. This might not
be the best approach.
(yybadtoken): Handle REGTOKEN in switch.
* regex.c (struct any_char_set, struct small_char_set,
struct displaced_char_set, struct large_char_set,
struct xlarge_char_set): New bitfield member, stat.
(char_set_create): New parameter for indicating static char set.
(char_set_destroy): Do not free a static char set.
(char_set_compile): Pass zero to new parameter of char_set_create.
(spaces): New static array.
(space_cs, digit_cs, word_cs, cspace_cs, cdigit_cs, cword_cs): New
static pointers to char_set_t.
(init_special_char_sets, nfa_compile_given_set): New static function.
(nfa_compile_regex, dv_compile_regex): Handle new character set token
keywords.
(space_k, digit_k, word_char_k, cspace_k, cdigit_k, cword_char_k,
regex_space_chars): New variables.
(regex_init): New function.
* regex.h (space_k, digit_k, word_char_k, cspace_k, cdigit_k,
cword_char_k, regex_space_chars, regex_init): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
remqual*, remove-if*, keep-if*.
* lib.c (rem_lazy_func, rem_lazy_rec): New static functions.
(remq_lazy, remql_lazy, remqual_lazy, remove_if_lazy,
keep_if_lazy): New functions.
* lib.h (remq_lazy, remql_lazy, remqual_lazy, remove_if_lazy,
keep_if_lazy): Declared.
* txr.1: New functions documented.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (find): First and second arguments reversed.
The item should be first.
(find_if): New function.
* lib.h (find): Declaration updated.
(find_if): Declaration added.
* txr.1: Stub section.
|
| |
|
|
|
|
|
|
|
|
| |
* lib.c (remove_if, keep_if): New functions.
* lib.h (remove_if, keep_if): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
nonexistent options. Variable default values are established first,
which simplifies the syntax. The scanning loop detects attempts
to create configuration variables that do not exist.
The var_given convention is folded into the parsing. (If var
exists, and var_given exists, and the user specifies var,
then var_given is set to y to indicate that the value came
from the user.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in argument list. Fix is not to rely on the hack of using the first
element of the list of files to hold the name of the current file.
* match.c (match_files_ctx): New member, curfile.
(mf_all): Initialize curfile.
(mf_args): Set curfile to "args".
(mf_file_data): Initialize curfile.
(v_skip, v_fuzz, v_gather, v_collect): Use c->curfile rater than
first(c->files) in debug calls.
(freeform_prepare, match_files): Pass c->curfile to ml_all constructor
of match_line_ctx rather than rather than first(c->files).
|
|
|
|
|
|
|
|
|
|
|
| |
character compounds. I.e. the syntax "foo" is equivalent to the
cumbersome canonical form (compound #\f #\o #\o).
* regex.c (nfa_compile_regex, dv_compile_regex): Use chrp function
instead of typeof. Handle stringp case by forming a compound out of the
characters and recursing. Check for some bad objects in the regex
that would never come out of our regex parser but could occur
in a "hand crafted" syntax tree.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): New intrinsic functions source-loc
and source-loc-str. New variable *self-path*.
* txr.1: Stub doc sections.
* txr.c (self_path): New variable.
* txr.h (self_path): Declared.
* txr.vim: Syntax highlighting for source-loc, source-loc-str
and *self-path*.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to work around TXR build problems by running make inside
the MPI directory, which is wrong.
Also fixing an incorrect use of ctype.h functions in
MPI and one case of a superfluous warning.
* mpi-patches/series: new patches added.
* mpi-patches/disable-make: New file.
* mpi-patches/fix-ctype-warnings: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (EXTRA_FLAGS): Handy new variable for additional
ad-hoc CFLAGS. Needed by a new test in configure.
* configure: Check for annoying warnings about char being used
as an array subscript when calling the macros from <ctype.h>.
If this occurs, suppress it by #undef-ing the macros.
(lang_flags): Switching fromm _XOPEN_SOURCE to _XOPEN_SOURCE=2
because this is needed on NetBSD to obtain declarations of
popen and pclose.
* stream.c (pipe_close): If we don't have the WIFCONTINUED macro,
then define it to expand to zero. It's absent on NetBSD and they
already seem to have a hack for this because there is a warning about
the function not being defined, but then the program links anyway.
Let's do it properly and not rely on their hack.
|