summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * win/env.nsh: Before the potentially length SendMessage,Kaz Kylheku2015-02-052-1/+8
| | | | print an informative message.
* * win/env.nsh: Improve messages about environmentKaz Kylheku2015-02-052-9/+14
| | | | variable modification.
* Symbol macros shadowed by functions under dwim.Kaz Kylheku2015-02-033-20/+125
| | | | | | | | | | | * eval.c (lookup_symac_lisp1, expand_lisp1, expand_forms_lisp1): New static functions. (expand): Handle dwim's arguments via expand_forms_lisp1, rather than as a generic compound form. * txr.1: Revised text in several places to clarify this expansion rule.
* Version 103.txr-103Kaz Kylheku2015-02-015-4/+62
|
* Update copyright notices from 2014 to 2015.Kaz Kylheku2015-02-0140-40/+53
| | | | | | | | | | | * arith.c, arith.h, combi.c, combi.h, debug.c, debug.h, eval.c, eval.h, filter.c, filter.h, gc.c, gc.h, hash.c, hash.h, lib.c, lib.h, match.c, match.h, parser.h, rand.c, rand.h, regex.c, regex.h, signal.c, signal.h, stream.c, stream.h, sysif.c, sysif.h, syslog.c, syslog.h, txr.c, txr.h, unwind.c, unwind.h, utf8.c, utf8.h: Update. * LICENSE, METALICENSE: Likewise.
* Windows installer.Kaz Kylheku2015-02-013-0/+442
| | | | | | * inst.nsi: New file. * win/env.nsh: New file.
* On Windows, add icon and identifying meta-data to executable.Kaz Kylheku2015-01-316-3/+75
| | | | | | | | | | | | | | | * Makefile (EXTRA_OBJS-y): New variable. (WINDRES): New recipe. * configure: Check for presence of windres, and generate add_win_res variable in config.make. * win/txr.xcf: New file: GIMP project for icon. * win/txr.ico: New file: icon with three sizes generated from GIMP project. * win/txr.rc: New file.
* Use macro to initialize strm_ops.Kaz Kylheku2015-01-294-222/+170
| | | | | | | | | | * stream.h (strm_ops_init): New macro. * stream.c (null_ops, stdio_ops, tail_ops, pipe_ops, string_in_ops, byte_in_ops, string_out_ops, strlist_out_ops, dir_ops, cat_stream_ops): Initialize using macro. * syslog.c (syslog_strm_ops): Likewise.
* Use macro to initialize cobj_ops.Kaz Kylheku2015-01-295-35/+40
| | | | | | | | | | * lib.h (cobj_ops_init): New macro. * hash.c (hash_ops, hash_iter_ops): Initialize with cobj_ops_init. * rand.c (random_state_ops): Likewise. * regex.c (char_set_obj_ops, regex_obj_ops): Likewise.
* * arith.c (make_ubignum): New static function.Kaz Kylheku2015-01-297-258/+338
| | | | | | | | | | | | (sign_extend): New function. * eval.c (eval_init): Register sign-extend intrinsic. * lib.h (sign_extend): Declared. * txr.1: Documented sign-extend. * tl.vim, txr.vim: Updated.
* * txr.1: Minor change under make-random-state.Kaz Kylheku2015-01-291-1/+1
|
* * txr.1: fixed use of nonexistent str-int in @(require) example;Kaz Kylheku2015-01-292-5/+8
| | | | fixed bad formatting under logtrunc and partition.
* * eval.c (get_opt_param_syms): Fix broken function. ThisKaz Kylheku2015-01-282-9/+15
| | | | | | was choking on keywords like :env in the lambda list, and failing to handle the nested patterns of macro lambda lists. Failing case: (defmacro x (: opt :env foo)).
* * eval.c (bind_macro_params): Bugfix: the colon argument's specialKaz Kylheku2015-01-282-1/+7
| | | | | meaning "treat the argument as missing" must apply only to optional parameters.
* * lib.c (make_like): Fix regression introduced in 102.Kaz Kylheku2015-01-272-1/+7
| | | | | A one element list being converted to a string treated as an empty list, leading to empty string.
* * arith.c (width): New function.Kaz Kylheku2015-01-275-0/+80
| | | | | | | | * arith.h (width): Declared. * eval.c (eval_init): Width registered as intrisinc. * txr.1: Documented width.
* * eval.c (call_f): new global variable.Kaz Kylheku2015-01-253-2/+74
| | | | | | | | | (do_mapf, mapf): new static functions. (eval_init): protect call_f from gc, and initialize it. re-register call function using call_f. register mapf intrinsic. * txr.1: Documented mapf.
* * eval.c (eval_init): Register dupl and swap_12_21 asKaz Kylheku2015-01-255-0/+56
| | | | | | | | | | | the dup and flip intrinsics. * lib.c (do_dup): New static function. (dupl): New function. * lib.h (dupl): Declared. * txr.1: Documented dup and flip.
* * eval.c (callf): New static function.Kaz Kylheku2015-01-243-0/+47
| | | | | | (eval_init): callf registered. * txr.1: Documented callf.
* * txr.1: Grammar.Kaz Kylheku2015-01-241-1/+1
|
* Basic implementation of constantp. Does notKaz Kylheku2015-01-215-284/+370
| | | | | | | | | | | recognize forms like (+ 2 2) as constant. * eval.c (constantp_noex, constantp): New functions. (eval_init): Registered constantp as intrinsic. * tl.vim, txr.vim: Updated. * txr.1: Documented constantp.
* * stream.c (get_string): New argument, close_after_p.Kaz Kylheku2015-01-214-4/+33
| | | | | | | | | | | Close the stream unless close_after_p is specified and is nil, or when it is missing, an there is no compatibility or it's newer than version 102. * stream.h (get_string): Updated declartion. * txr.1: Documented default closing behavior of get-string and the new optional argument for overriding it.
* * txr.1: Minor fix in split-str-set documentation.Kaz Kylheku2015-01-212-1/+5
|
* Allow macros to tell what symbols have lexical functionKaz Kylheku2015-01-215-192/+305
| | | | | | | | | | | or variable bindings. * eval.c (lexical_var_p, lexical_fun_p): New local functions. (eval_init): Registered as intrinsics. * txr.1: Documented lexical-var-p and lexical-fun-p. * tl.vim, txr.vim: Updated.
* Version 102.txr-102Kaz Kylheku2015-01-137-230/+285
|
* * arith.c (zerop): Handle character arguments.Kaz Kylheku2015-01-125-1/+76
| | | | | | | | | | | (plusp, minusp): New functions. * eval.c (eval_init): Register plusp and minusp. * lib.h (plusp, minusp): Declared. * txr.1: Documented plusp and minusp, and the handling of characters by zerop.
* Fix for LLVM wchar_t literals not being four byteKaz Kylheku2015-01-124-46/+60
| | | | | | | | | | | | | | | | | aligned, affecting OS X port. * configure: Detect a SIZEOF_WCHAR_T when detecting integer type that will hold a pointer. In the lit_align test, if we are on Apple Mac OSX, use a lit_align of 2, so the logic kicks in for padding literals and handling misalignment. * lib.h (litptr): Add a case for LIT_ALIGN < 4 and SIZEOF_WCHAR_T == 4. In this case we do the arithmetic on the pointer using short *, and then convert to wchar_t. * HACKING: New section 2.4.3 about new wchar_t hack.
* * signal.h (sig_save_enable, sig_save_disable):Kaz Kylheku2015-01-122-8/+15
| | | | | | | | Use do;while(0) trick instead of local typedef to cause terminating semicolon to be required. (sig_restore_enable, sig_restore_disable): Remove superfluous do { } while (0). Closing a brace is good enough.
* * glob.c: New file.Kaz Kylheku2015-01-118-1/+272
| | | | | | | | | | | | | | | | | | | | (glob_wrap, glob_init): New functions. (errfunc_thunk): New static function. * glob.h: New file. * txr.c (main): call glob_init if HAVE_GLOB is defined. * configure (have_glob): New variable. (gen_config_make): Add have_glob to config/config.make. Detect glob function and set have_glob, and add HAVE_GLOB to config/config.h. * Makefile (OBJS): Include glob.h if have_glob is "y". * genvim.txr: Scan glob.c for functions and variables also. * txr.1: Documented glob and glob-related variables.
* * Makefile (retest): New phony target for convenience.Kaz Kylheku2015-01-112-0/+7
|
* * lib.c (make_like): Bugfix. (make-like nil "abc")Kaz Kylheku2015-01-113-0/+27
| | | | | | | | | | must return the empty string, not nil. Only lists of non-characters fail to convert to a string. Since programs may depend on the hitherto wrong, undocumented behavior, this is made subject to compatibility. * txr.1: Added compatibility note.
* * eval.c (merge_wrap): Make generic over sequences.Kaz Kylheku2015-01-113-15/+35
| | | | * txr.1: Update documentation for merge function.
* * match.c (h_trailer): Bugfix: not returning new variableKaz Kylheku2015-01-052-2/+7
| | | | bindings captured in trailer section. Ouch!
* * txr.1: Formatting fixes.Kaz Kylheku2015-01-031-2/+2
|
* Version 101.txr-101Kaz Kylheku2015-01-014-5/+96
|
* * Makefile (rebuild, clean, repatch): Fail these targets ifKaz Kylheku2015-01-012-4/+30
| | | | | | the program is not configured. (distclean): Providing alternative implementation when the program is not configured.
* * lib.c (replace_str, replace_vec): Bugfix. The replacement itemKaz Kylheku2014-12-312-87/+98
| | | | | | sequence may be an infinite list in the case that the from argument specifies a list of indices. We must avoid trying to calculate its length before we have detected this case.
* * txr.1: Fix error. (set [seq index-list] new) corresponds toKaz Kylheku2014-12-312-3/+13
| | | | replace not to refset.
* * lib.c (simple_lazy_stream_func): Bugfix: close the streamKaz Kylheku2014-12-254-10/+28
| | | | | | | | | | if get_line returns nil. * stream.c (cat_get_line, cat_get_char, cat_get_byte): The catenated stream read operations close an exhausted stream before popping to the next one. * txr.1: Document closing behavior of catenated streams.
* * stream.c (stream_init): Register make_catenated_stream inKaz Kylheku2014-12-255-297/+313
| | | | | | | | a different form as cat-streams. * txr.1: Document cat-streams. * tl.vim, txr.vim: Regenerated.
* * txr.1: Small fix under get-lines.Kaz Kylheku2014-12-251-1/+1
|
* * eval.c (ap_s, ret_s, aret_s): New symbol variables.Kaz Kylheku2014-12-235-311/+372
| | | | | | | | | | | | (me_ret): Static function renamed to me_ret_aret. Handles ret and aret macro expansion. (eval_init): Initialize ap_s, ret_s and aret_s. Re-register ret macro using ret_s and bind to me_ret_aret. Register aret macro. * txr.1: Documented aret. * tl.vim, txr.vim: Regenerated.
* * eval.c (eval_init): Registered intrinsic function unique.Kaz Kylheku2014-12-237-18/+109
| | | | | | | | | | | * lib.c (unique): New function. (uniq): Becomes wrapper around unique. * lib.h (unique): Declared. * txr.1: Documented unique, and equivalence between uniq and unique. * tl.vim, txr.vim: Regenerated.
* * lib.c (func_n1ov, func_n2ov, func_n3ov): New functions.Kaz Kylheku2014-12-233-0/+30
| | | | * lib.h (func_n1ov, func_n2ov, func_n3ov): Declared.
* * lib.c (func_n0o): Useless, unused function removed.Kaz Kylheku2014-12-233-8/+6
| | | | * lib.h (func_n0o): Declaration removed.
* Syntax highlighting issue: keywords in braced variable syntaxKaz Kylheku2014-12-184-2/+16
| | | | | | | | | | not being recognized. * genvim.txr (txr_braced_ident): New match kind, specifically for a keyword. (txr_bracevar): Bracevar region contains txr_braced_indent. * txr.vim, tl.vim: Regenerated.
* * lib.c (copy): Support copying random state objectsKaz Kylheku2014-12-183-12/+28
| | | | | | vi make_random_state. * txr.1: Updated.
* * rand.c (rand32): Bugfix: if the seed object is a randomKaz Kylheku2014-12-173-6/+27
| | | | | | | | | state, we do not want to make the 8 calls to rand32 to mix up the state; we need are making a straight copy. * txr.1: Document the possibility that the seed object is a random state. Document the platform-independence of the integer seed.
* * rand.c (struct rand_state): Change cur member to unsigned.Kaz Kylheku2014-12-172-1/+6
| | | | This generates better code for rand32.
* * rand.c (rstate): New inline function.Kaz Kylheku2014-12-162-8/+17
| | | | | (rand32): Use inline function instead of macro. I compared gcc -O2 output on Intel: no difference.