summaryrefslogtreecommitdiffstats
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
...
* * txr.1: Documented string library.Kaz Kylheku2012-09-061-0/+4
|
* * eval.c (eval_init): Follow function renames.Kaz Kylheku2012-09-021-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * txr.1: Lots of new documentation. Major rearrangement of document,Kaz Kylheku2012-09-011-0/+5
| | | | with new headings.
* * eval.c (symbol_function): Bugfix: return the function rather thanKaz Kylheku2012-09-011-0/+5
| | | | the whole binding.
* * txr.1: Minor corrections, and documented most stream functions,Kaz Kylheku2012-09-011-0/+5
| | | | except directory-related ones.
* * txr.1: Documented print, pprint, tostring and tostringp.Kaz Kylheku2012-09-011-0/+4
|
* * stream.c (vformat): Bugfix: under the ~a and ~s directives,Kaz Kylheku2012-08-311-0/+8
| | | | | | | 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.
* * eval.c (expand): Bugfix: failure to handle regularKaz Kylheku2012-08-311-0/+6
| | | | | expression syntax, resulting in (set ...) syntax being regarded as assignment (due to another recent change).
* * txr.1: Documented chain, andf, orf and iff.Kaz Kylheku2012-08-301-0/+4
|
* * eval.c (eval_intrinsic): Bugfix: take the expanded form insteadKaz Kylheku2012-08-301-0/+8
| | | | | | | of throwing it away. (expand): Recurse into expand_place for (set ...) forms. * txr.1: Documented eval.
* * txr.1: Documented all functions related to hashing.Kaz Kylheku2012-08-301-0/+4
|
* * lib.c (multi_sort_less): Fixing semantics of return value. IndividualKaz Kylheku2012-08-291-0/+5
| | | | sorted lists are returned, rather than a list of zipped tuples.
* * lib.c (multi_sort_less): Change the semantics so that when theKaz Kylheku2012-08-291-0/+6
| | | | | list of the functions is empty, the left item is considered less than the right, thereby preserving the order.
* * eval.c (mapcarv): Changed to external linkage.Kaz Kylheku2012-08-291-0/+14
| | | | | | | | | | | | * 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.
* * eval.c (eval_init): Registered open-command and open-processKaz Kylheku2012-05-181-0/+13
| | | | | | | | | | | | 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.
* * stream.c (open_pipev): Bugfix: program name is includedKaz Kylheku2012-05-181-0/+5
| | | | as first element of argv.
* Implement open_pipev in terms of popen for Windows whichKaz Kylheku2012-05-181-0/+14
| | | | | | | | | | | | | 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.
* * configure: New test added for fork, pipe, exec and waitpid.Kaz Kylheku2012-05-181-0/+5
| | | | Produces HAVE_FORK_STUFF in config.h.
* * match.c (complex_open): Likewise.Kaz Kylheku2012-05-181-0/+4
| | | | * stream.c (w_opendir): Likewise.
* * utf8.c (w_fopen, w_popen): Removing unnecessary casts ofKaz Kylheku2012-05-181-0/+5
| | | | return values of ut8_dup_to.
* Implementing new pipe function to get around the limitationKaz Kylheku2012-05-181-0/+24
| | | | | | | | | | | | | | | | | | | | | | | 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.
* * match.c (v_collect): Implemented semantics for repeat symbol.Kaz Kylheku2012-05-171-0/+17
| | | | | | | | | | | | | | | | (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: Do not capture the stderr of GNU Make in theKaz Kylheku2012-05-171-0/+7
| | | | | | configure step; send it to /dev/null. * txr.spec: Adding specfile for building RPMs.
* * eval.c (range_v_func, range_v_star_func): Restore the order ofKaz Kylheku2012-04-241-0/+11
| | | | | | | | | | 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.
* * arith.c (plus): Fixed broken (+ fixnum char) case.Kaz Kylheku2012-04-241-0/+4
|
* Fixes for configuring and building in a separate directory.Kaz Kylheku2012-04-201-0/+12
| | | | | | | | | | * 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.
* Version 65txr-65Kaz Kylheku2012-04-201-0/+12
| | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated.
* * regex.c (regex_space_chars): Variable removed.Kaz Kylheku2012-04-201-0/+10
| | | | | | | | | (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.
* * parser.y (regtoken): New nonterminal symbol.Kaz Kylheku2012-04-201-0/+17
| | | | | | | | | | | | | | | | (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.
* * txr.1: Documented new regex tokens.Kaz Kylheku2012-04-191-0/+2
|
* First cut at implementing \s, \d, \w, \S, \D and \W regex tokens.Kaz Kylheku2012-04-191-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * eval.c (eval_init): New intrinsic functions remq*, remql*,Kaz Kylheku2012-04-151-0/+14
| | | | | | | | | | | | | 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.
* * eval.c (eval_init): find-if intrinsic registered.Kaz Kylheku2012-04-141-0/+13
| | | | | | | | | | | * 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.
* * HACKING: Added notes on generational garbage collection.Kaz Kylheku2012-04-141-0/+4
|
* * eval.c (eval_init): New functions remove-if and keep-if.Kaz Kylheku2012-04-141-0/+10
| | | | | | | | * lib.c (remove_if, keep_if): New functions. * lib.h (remove_if, keep_if): Declared. * txr.1: Documented.
* * configure: Restructuring configure script to be able to detectKaz Kylheku2012-04-131-0/+11
| | | | | | | | | | 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.)
* Bugfix: multiple uses of @(next :args) seeing junk "args" stringKaz Kylheku2012-04-131-0/+15
| | | | | | | | | | | | | | 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).
* Improve the regex Lisp syntax by allowing strings to specifyKaz Kylheku2012-04-121-0/+12
| | | | | | | | | | | 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.
* * txr.1: Fix misleading comment example.Kaz Kylheku2012-04-111-0/+4
|
* Adding patch to MPI to disable its Makefile so people don't tryKaz Kylheku2012-04-101-0/+15
| | | | | | | | | | | | | | 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.
* More NetBSD porting.Kaz Kylheku2012-04-101-0/+20
| | | | | | | | | | | | | | | | | | * 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.
* * arith.c (INT_PTR_MAX_MP): New static variable.Kaz Kylheku2012-04-101-0/+16
| | | | | | | | | | | | | | | (in_int_ptr_range): New function. (arith_init): Initialize INT_PTR_MAX_MP. * arith.h (in_int_ptr_range): Declared. * lib.c (c_num): Allow bignums to be converted to a cnum, if they are in range, rather than allowing only fixnums. * rand.c (make_random_state): Now that we have such a function, initialize random seed using time value from time_sec_usec rather than from time and clock. clock is bad for random seeding because it measures virtual time since the start of the process.
* * configure: Switch from _POSIX_C_SOURCE=2 to _XOPEN_SOURCE.Kaz Kylheku2012-04-101-0/+9
| | | | | | | | We will be relying on the gettimeofday function which only came into POSIX in 2001, but was in Unix long before then. * HACKING: Replace notes about -D_POSIX_C_SOURCE which are not true any more.
* * Makefile (conftest.ccver): New phony target.Kaz Kylheku2012-04-101-0/+9
| | | | | | | * configure: The test for non-working 128 bit integers in the gcc used by NetBSD 5.1 is not good enough to catch the bug. Adding a test which will assume that gcc 4.3.x and lesser does not have working 128 bit types.
* * eval.c (eval_init): Expose regex-compile and regexp as intrinsics.Kaz Kylheku2012-04-101-0/+15
| | | | | | | | | | | | | * lib.c (obj_init): Change spelling of nongreedy operator and put it into the user package so that it is available for use with regex-compile. * regex.c (match_regex, search_regex): Bugfix: optional start position argument argument not defaulting to zero. * txr.1: Documented regex-compile and regexp. * txr.vim: Highlighting regex-compile and regexp.
* Clarify which NetBSD.Kaz Kylheku2012-04-091-1/+1
|
* NetBSD port.Kaz Kylheku2012-04-091-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | * arith.c (bignum_dbl_ipt): Added missing #if HAVE_DOUBLE_INTPTR_T around function * configure: NetBSD's shell is too pathetic to expand "$@" properly when there are no positional arguments, so I applied the ${@+"$@"} trick. (make): New variable. GNU make might be known only as gmake, so we now detect the command for our own use within the configure script and also for giving the user advice on what command to use for building. Put in a fix so that the attempt to run $make --version does not bail the script under "set -e" if that command terminates unsuccessfully. The check for clashing names has been moved earlier, so that the renaming #define's appear early in config.h (so config.h itself can rely on the renames). The identifier longlong_t has been added to the potential clash list. NetBSD exposes this identifier in spite of -D_POSIX_SOURCE=2, and it clashes with our longlong_t. The tests for integers wider than long long has been modified to actually compile a multiplication of two long-long-s into the wider precision. On the NetBSD system, with gcc 4.1.3, I found that the __int128 type is there, but doesn't actually work; compilation of arith.c bails with an internal compiler error. We now get this internal error at configure time and avoid using the type.
* * mpi-patches/add-mp-hash (mp_hash): Fix incorrectKaz Kylheku2012-04-091-0/+9
| | | | | | | | code on platforms where mp_digit is smaller than long. This was left shifting a mp_digit by MP_DIGIT_BIT. It was found by compiling on NetBSD with a gcc 4.1.3 which has a broken__int128_t, forcing us to use 32 bit mp_digit with a 64 bit mp_word.
* * arith.c (bignum): Previously static function now exposed as external.Kaz Kylheku2012-04-081-0/+22
| | | | | | | | | | | | | | | | | | | | * arith.h (bignum): Declared. * configure: Added check for tm_gmtoff and tm_tmzone fields being present in struct tm. * eval.c (eval_init): New intrinsic functions: time, time-usec. * lib.c (num): If the cnum is outside of the fixnum range, then construct a bignum. (time_sec, time_sec_usec): New functions. * lib.h (mut): Slight change to macro to eliminate compiler warning. (time_sec, time_sec_usec): Declared. * txr.1: Stub section for time and time-usec. * txr.vim: Highlighting for time and time-usec.
* * txr.vim: Fixed accidental breakage.Kaz Kylheku2012-04-081-0/+4
|