| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect that it has two arguments now.
* parser.y (grammar): Update calls to regex_compile to
pass two arguments. Since we don't expect regex_compile to
parse, we specify the error stream as nil.
(spec): The "secret syntax" for a regex is simplified
not to include the slashes. This provides better diagnostics for
unterminated syntax and requires less string processing to generate.
Also, the form returned doesn't have the regex symbol
consed onto it, which parse_regex just throws away.
* regex.c (regex_compile): Now takes a stream argument.
* regex.h (regex_compile): Declaration updated.
* txr.1: Updated
|
|
|
|
|
|
|
| |
* regex.h (regex_compile): Don't call argument
regex_sexp, since it can be a string.
* txr.1: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
intrinsic function and std_null as new variable.
* parser.h (yylex_destroy): Existing function declared.
* parser.l (regex_parse): New function.
New lexical syntax added which returns SECRET_ESCAPE_R.
* parser.y (SECRET_ESCAPE_R): New token.
(spec): Added syntactic variant which lets us
smuggle a regex into the parser easily.
* stream.c:x (std_null): New global variable.
(null_stream_print): New static function.
(null_ops): New static structure.
(make_null_stream): New function.
(stream_init): Protect and initialize std_null.
* stream.h (std_null, make_null_stream): Declared.
* txr.1: New features documented: regex-parse, *stdnull*.
* txr.c (txr_main): Call yylex_destroy after parsing the program now
that I know about this function; this can free up some memory.
|
|
|
|
|
|
|
|
|
|
| |
and count_if registered as intrinsics.
* lib.c (countqual, countql, countq, count_if): New functions.
* lib.h (countqual, countql, countq, count_if): Declared.
* txr.1: New functions documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have stricter diagnosis for configure tests.
(have_timegm, need_svid_source, need_bsd_source): New
variables. sys/stat.h test only declares static data and
compiles an object file. Adding tests for timegm, tzset,
setenv and unsetenv.
* eval.c (eval_init): Register new intrinsic, make_time_utc.
* lib.c (make_time_impl): New static function.
(make_time): Reimplemented as call to make_time_impl.
(timegm_hack): New conditionally-defined static function.
(make_time_utc): New function.
* lib.h (make_time_utc): Declared.
* txr.1: make-time-utc documented.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c: Include <unistd.h> conditionally.
(errno_wrap, daemon_wrap): New functions.
(eval_init): Registered errno_wrap and daemon_wrap as intrinsics
under the names daemon and errno.
* txr.1: Documented errno and daemon in new UNIX PROGRAMMING
section.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bugfix in stdio_flush: check FILE * handle for null.
Minor cleanups.
* eval.c (eval_init): Register seek_stream as intrinsic.
* stream.c (from_start_k, from_current_k, from_end_k): New symbol
variables.
(strm_whence): New enum.
(strm_ops): New member, seek.
(stdio_maybe_write_error): Renamed to stdio_maybe_error; takes
new string argument to describe action.
(stdio_put_string, stdio_put_char, stdio_put_byte): Updated call to
stdio_maybe_error.
(stdio_flush): Updated call to stdio_maybe_error. Check
handle for null.
(stdio_seek): New static function.
(stdio_ops): Added stdio_seek.
(pipe_ops, string_in_ops, byte_in_ops, string_out_ops,
strlist_out_ops, dir_ops): Added explicit zero entries and comments for
unimplemented functions.
(seek_stream): New function.
(stream_init): New keyword symbols interned.
* stream.h (from_start_k, from_current_k, from_end_k): New
variables declared.
(dev_k, ino_k, mode_k, nlink_k, uid_k, gid_k, rdev_k, size_k,
blksize_k, blocks_k, atime_k, mtime_k, ctime_k, s_ifmt, s_iflnk,
s_ifreg, s_ifblk, s_ifdir, s_ifchr, s_ififo, s_isuid, s_isgid, s_isvtx,
s_irwxu, s_irusr, s_iwusr, s_ixusr, s_irwxg, s_irgrp,
s_iwgrp): Existing extern variables declared.
(seek_stream): New function declared.
* txr.1: Documented seek-stream.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
| |
|
| |
|
|
|
|
| |
arguments is a right-associative reduction, not left.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
output blocks across the same stream.
* match.c (close_s, named_k, continue_k, finish_k): New symbol
variables.
(v_output): Implement :named, :finish and :continue.
(v_close): New static function.
(syms_init): New symbols interned.
(dir_tables_init): New entry associating v_close
function with symbol stored in close_s.
* match.h (close_s): Declared.
* txr.1: New features documented.
|
|
|
|
| |
* and time-string-utc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explicitly specifying @rest using (op ... . @rest)
did not work at all.
The then-func agument of iff and iffi may now be nil.
* eval.c (format_op_arg): New static function.
(transform_op): Handle dotted lists ending in @rest
or @<num>.
(supplement_op_syms): New static function.
(expand_op): Add missing numeric arguments,
so that all 1 through n are in the list.
Trailing rest is now added under different
conditions.
* lib.c (do_iff): Give thenfun the same
behavior on nil that elsefun enjoys.
* txr.1: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
block, for specifying variables to include in iteration whose
presence repeat is not able to deduce.
* match.c (extract_bindings): New argument, vars, specifies
additional variables to consider.
(do_output_line, do_output): Process :vars argument of repeat
and rep directive.
* txr.1: Updated.
|
| |
|
|
|
|
|
|
|
| |
txr.1: Documented line continuation for string literals,
supported since Version 38 but not clarified properly.
RELNOTES: Updated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version, set date and documented string-cmp.
* configure (txr_ver): Bumped.
* eval.c (eval_init): Forgotten string-cmp registered as intrinsic.
* txr.vim: Highlighting for string-cmp.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(v_require): New static function.
(syms_init): Initialize require_s.
(dir_tables_init): Add new entries into v_directive_table
and h_directive_table for new require directive.
* match.h (require_s): Declared.
* txr.1: Added do and require directives to the directive summary
section. Documented new require directive.
Fixed int-str documentation to clarify that the radix is
optional.
|
|
|
|
|
|
|
|
| |
* lib.c (tok_str): New parameter, keep_sep.
* lib.h (tok_str): Declaration updated.
* txr.1: Documentation for tok-str updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added lazy-stringp. Changing names of length-str-{gt,ge,lt,le}
to be consistent with the >, >=, < and <= functions.
* lib.c (lazy_stream_func): Greatly simplified implementation.
The lazy list now continues by means of recursing via
an optimized version of lazy_stream_cons called lazy_stream_cont.
The environment structure is simplified to just hold the next item,
rather than a pointless list. The pointless setting of lcons->lc.func
to nil is also removed; this is always done by the caller.
(lazy_stream_cont): New static function, similar to lazy_stream_cons,
but optimized by not consing up a new function and new environment
cell.
(lazy_stream_cons): The environment for the update function
is simplified to just a single cons.
* txr.1: Documented lazy string functions and lazy-stream-cons.
|
|
|
|
|
|
|
|
| |
* lib.c (tok_str): New function.
* lib.h (tok_str): Declared.
* txr.1: Documented.
|
|
|
|
| |
for split-str-set.
|
|
|
|
|
| |
takes a regex, not just a fixed string separator. Clarified
the corner case behaviors too.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
time-string-utc.
* lib.c (string_time): New static function.
(time_string_local, time_string_utc): New functions.
* lib.h (time_string_local, time_string_utc): Declared.
* txr.1: Documented.
* RELNOTES: Updated.
|
|
|
|
|
|
|
| |
prior to the call. The first data line number is 1, not zero,
if there is data.
* txr.1: Added usage example for match-fun.
|
|
|
|
| |
and *self-path*.
|
| |
|
|
|
|
|
|
| |
optional.
* txr.1: Documented random functions as well as range and range*
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Expose delete-package, rehome-sym
and packagep.
* lib.c (make_package, intern): use ~s formatting for package name in
error message.
(packagep, delete_package, rehome_sym): New functions.
* lib.h (packagep, delete_package, rehome_sym): Declared.
* txr.1: Documented process functions and packages.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (iff): Reversed argument names corrected. No functional
change.
(iffi): New function.
* lib.h (iffi): Declared.
* txr.1: Documented iffi.
|
|
|
|
|
|
|
| |
defaulting to a true test, allowing an infinite loop to
be expressed as (for () () () ...).
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Registered logtest.
Registered s-ifmt, s-iflnk, s-ifreg, s-ifblk, s-ifdir,
s-ifchr, s-ififo, s-isuid, s-isgid, s-isvtx, s-irwxu,
s-irusr, s-iwusr, s-ixusr, s-irwxg, s-irgrp, s-iwgrp,
s-ixgrp, s-irwxo, s-iroth, s-iwoth, s-ixoth variables.
* lib.h (logtest): Declared.
* stream.c (s_ifmt, s_ifsock, s_iflnk, s_ifreg, s_ifblk,
s_ifdir, s_ifchr, s_ififo, s_isuid, s_isgid, s_isvtx, s_irwxu, s_irusr,
s_iwusr, s_ixusr, s_irwxg, s_irgrp, s_iwgrp, s_ixgrp, s_irwxo, s_iroth,
s_iwoth, s_ixoth): New global variables.
* stream.h (s_ifmt, s_ifsock, s_iflnk, s_ifreg, s_ifblk,
s_ifdir, s_ifchr, s_ififo, s_isuid, s_isgid, s_isvtx, s_irwxu, s_irusr,
s_iwusr, s_ixusr, s_irwxg, s_irgrp, s_iwgrp, s_ixgrp, s_irwxo, s_iroth,
s_iwoth, s_ixoth): Declared.
* txr.1: Documented logtest and s-* variables for stat,
as well as open-file and open-directory.
|
| |
|
|
|
|
|
|
|
|
|
| |
point integer, .0 is now always shown if the precision is not given,
or if it is given and nonzero. Previous behavior of ~s was add .0 only
when a precision is not specified. The new behavior is more
sensible and consistent with documentation.
* txr.1: Typo fixed in related documentation.
|
|
|
|
|
|
|
| |
These will be very useful since bit operations are about
to be implemented.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hash-uni, hash-diff, hash-isec.
* hash.c (make_similar_hash, copy_hash, hash_uni, hash_diff,
hash_isec): New functions.
* hash.h (make_similar_hash, copy_hash, hash_uni, hash_diff,
hash_isec): Declared.
* txr.1: Updated.
* txr.vim: Highlighting for these new functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
| |
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.
|