summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix dates.txr-67Kaz Kylheku2013-07-132-2/+2
|
* Version 67Kaz Kylheku2013-07-133-3/+25
| | | | | | | txr.1: Documented line continuation for string literals, supported since Version 38 but not clarified properly. RELNOTES: Updated.
* * parser.l: Diagnose unrecognized escape sequences in stringKaz Kylheku2013-07-132-1/+16
| | | | | | literals and quasiliterals and after @\. Support "\ " (backslash space) escape in string literals and quasiliterals.
* * txr.1: Fix slipup, where call is referred to as funcall.Kaz Kylheku2013-07-122-1/+5
|
* Version 67Kaz Kylheku2013-07-127-6/+61
| | | | | | | | | | | | | | * 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.
* * txr.vim: Bringing up to date.Kaz Kylheku2013-07-122-6/+20
|
* * match.c (require_s): New variable.Kaz Kylheku2013-06-114-4/+55
| | | | | | | | | | | | | | (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.
* * eval.c (eval_init): tok-str acquires new parameterKaz Kylheku2013-06-115-5/+28
| | | | | | | | * lib.c (tok_str): New parameter, keep_sep. * lib.h (tok_str): Declaration updated. * txr.1: Documentation for tok-str updated.
* * eval.c (eval_init): lazy-str's third argument is optional.Kaz Kylheku2013-06-114-32/+258
| | | | | | | | | | | | | | | | | | | 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.
* ChangeLog fixup after rebase: move entry out of chronologicalKaz Kylheku2013-05-221-9/+8
| | | | | orer to the top, and remove references to changes that disappeared in the rebase.
* * eval.c (eval_init): lazy string related functions become intrinsics.Kaz Kylheku2013-05-224-1/+60
| | | | | | | * lib.c (string_cmp): New function. * lib.h (TYPE_SHIFT, TYPE_PAIR): New macros. (string_cmp): Declared.
* * eval.c (eval_init): Register tok_str as intrinsic.Kaz Kylheku2013-05-205-0/+59
| | | | | | | | * lib.c (tok_str): New function. * lib.h (tok_str): Declared. * txr.1: Documented.
* * txr.1: Corrected wrong function name in documentationKaz Kylheku2013-05-202-2/+7
| | | | for split-str-set.
* * txr.1: Misleading documentation updated for split-str, whichKaz Kylheku2013-05-202-8/+24
| | | | | takes a regex, not just a fixed string separator. Clarified the corner case behaviors too.
* Fix date.Kaz Kylheku2013-05-161-1/+1
|
* Version 66.txr-66Kaz Kylheku2013-05-165-5/+17
|
* * eval.c (eval_init): New intrinsics, time-string-local andKaz Kylheku2013-05-156-5/+88
| | | | | | | | | | | | | 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.
* * match.c (match_fun): Support debug stop on the functionKaz Kylheku2013-05-153-4/+50
| | | | | | | 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.
* * txr.1: Documented match-fun, source-loc, source-loc-strKaz Kylheku2013-05-151-0/+51
| | | | and *self-path*.
* * txr.1: Documented time and url encoding/decoding functions.Kaz Kylheku2013-05-142-0/+67
|
* * eval.c (eval_init): State argument in random-fixnum should beKaz Kylheku2013-05-143-2/+109
| | | | | | optional. * txr.1: Documented random functions as well as range and range*
* * RELNOTES: Updated in preparation for release.Kaz Kylheku2013-05-146-4/+330
| | | | | | | | | | | | | * 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.
* * eval.c (eval_init): New instrinsic function iffi registered.Kaz Kylheku2013-01-115-4/+37
| | | | | | | | | | * lib.c (iff): Reversed argument names corrected. No functional change. (iffi): New function. * lib.h (iffi): Declared. * txr.1: Documented iffi.
* * debug.c (help): Help text updated.Kaz Kylheku2013-01-102-2/+8
| | | | | (debug): Fix conflicting command assignment. Show form is now 'o'.
* * lib.c (int_str): Fix gaping bug introduced by previous commit,Kaz Kylheku2012-10-312-0/+9
| | | | | which could have been caught by running the regression test suite. The revised function was returning small integers as bignums.
* Merge branch 'master' of ssh://kylheku.com/git/txrKaz Kylheku2012-10-314-9/+22
|\ | | | | | | | | Conflicts: ChangeLog
| * * lib.c (string_lt): Bugfix: wcscmp returns some value less than zero,Kaz Kylheku2012-10-302-2/+6
| | | | | | | | not specifically -1.
| * Forgotten ChangeLog commit.Kaz Kylheku2012-10-301-0/+9
| |
| * * mpi-patches/config-types: Include the header as "config.h"Kaz Kylheku2012-10-302-7/+7
| | | | | | | | | | | | | | | | rather than "../config.h" because the dependency generation script checks for this as a special case and treats it relative to the build directory. * dep.mk: Regenerated.
* | * arith.c (bignum_from_long): New function.Kaz Kylheku2012-10-014-6/+34
|/ | | | | | | | | * arith.h (bignum_from_long): Declared. * lib.c (int_str): Streamlined. Only use mp_read_radix in the case when wcstol fails, because now we have bignum_from_long to handle all values of long. Ensure that the bignum is normalized, in case it falls in the fixnum range (does not happen on our usual platforms).
* * eval.c: Allow the test form of a for loop to be omitted,Kaz Kylheku2012-09-253-6/+17
| | | | | | | defaulting to a true test, allowing an infinite loop to be expressed as (for () () () ...). * txr.1: Documented.
* Spelling dammit.Kaz Kylheku2012-09-251-1/+1
|
* * RELNOTES: Correct incorrect 2011 yeras on all 2012 dates.Kaz Kylheku2012-09-252-14/+19
| | | | How did that happen?
* * eval.c (apply): Fix in error message: hard coded "apply" insteadKaz Kylheku2012-09-242-1/+6
| | | | of using ctx_form.
* Bugfix: internal funcall functions not handling functionsKaz Kylheku2012-09-242-1/+123
| | | | | | | | | with optional arguments. * lib.c (generic_funcall): New static function, based on apply from eval.c. (funcall, funcall1, funcall2, funcall3, funcall4): If the function being called has optional arguments, then go through generic_funcall.
* * arith.c (logand): Fix incorrect return value.Kaz Kylheku2012-09-242-1/+5
|
* * arith.c (logtest): New function.Kaz Kylheku2012-09-187-3/+170
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* Documenting bit ops.Kaz Kylheku2012-09-171-0/+101
|
* Bring syntax highlighting function list up to date.Kaz Kylheku2012-09-171-5/+7
|
* * stream.c (vformat): Slight change in ~s directive. For a floatingKaz Kylheku2012-09-173-2/+12
| | | | | | | | | 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.
* * arith.c (comp_trunc, logcomp): logcomp renamed to lognot,Kaz Kylheku2012-09-174-8/+17
| | | | | | | | consistent with Common Lisp. * eval.c (eval_init): logcomp to lognot. * lib.h (logcomp): Declaration updated.
* * arith.c (highest_significant_bit): New static function.Kaz Kylheku2012-09-175-11/+262
| | | | | | | | | | | | | | | | (comp_clamp): Bugfix: avoid shifting left into sign bit. Function renamed to comp_trunc. (logtrunc, ash): New functions. * eval.c (eval_init): Registered logtrunc and ash intrinsics. * lib.h (logtrunc, ash): Declared. * mpi-patches/add-bitops (s_highest_bit_mp): Forward declaration for added. (mp_clamp_comp): Bugfix in handling remainder bits. Function renamed to mp_trunc_comp. (mp_trunc, mp_shift): New functions.
* * mpi-patches/add-bitops: Bugfixes: mp_2comp is extended to properlyKaz Kylheku2012-09-162-13/+26
| | | | | | | | allow arbitrarily wide complements (which causes the code to access beyond the a argument's digits array). A similar fix is applied in the new mp_clamp_comp function. Incorrect initializations of mp_int fixed in all the logic functions: mp_init was used instead of mp_init_size.
* * arith.c (logand, logior, logxor): Bugfix: result needs to beKaz Kylheku2012-09-165-10/+111
| | | | | | | | | | | | | | normalized, otherwise we end up with fixnum-range bignums. (comp_clamp): New function. (logcomp): Changed to two argument form. If second argument is present (not nil) then call comp_clamp. * eval.c (eval_init): Change registration of logcomp to allow optional argument. * lib.h (logcomp): Declaration updated. * mpi-patches/add-bitops: New mp_clamp_comp function implemented.
* Adding complementing function.Kaz Kylheku2012-09-165-7/+85
| | | | | | | | | | * arith.c (logcomp): New function. * eval.c (eval_init): logcomp registered as intrinsic. * lib.h (logcomp) declared. * mpi-patches/add-bitops: Fixed bugs in mp_xor. Implemented mp_comp.
* Starting work on adding bit operations. The semantics is thatKaz Kylheku2012-09-166-0/+418
| | | | | | | | | | | | | | negative integers behave as an "infinite bit two's complement". * arith.c (logand, logor, logxor): New functions. * eval.c (eval_init): New intrinsic functions logand, logior, logxor. * lib.h (logand, logor, logxor): Declared. * mpi-patches/series: New patch, add-bitops. * mpi-patches/add-bitops: New file.
* * stream.c (vformat): Fix bug in ~x format directive for printingKaz Kylheku2012-09-162-14/+17
| | | | | | | | integers in hex. When we use the printf's %x conversion specifiers for fixnums, we get incorrect results when the values are negative, because the argument is actually treated as an unsigned integer. The end result is that (format t "~x" -1) produces FFFFFFFF rather than -1. Also, merged together mindless code duplication.
* * parser.l: Implemented hexadecimal integer constants.Kaz Kylheku2012-09-163-5/+44
| | | | | | | These will be very useful since bit operations are about to be implemented. * txr.1: Documented.
* * eval.c (eval_init): New intrinsics: make-similar-hash, copy-hash,Kaz Kylheku2012-09-126-3/+209
| | | | | | | | | | | | | | 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.
* Vector functions documented.Kaz Kylheku2012-09-111-1/+170
|