summaryrefslogtreecommitdiffstats
path: root/txr.1
Commit message (Collapse)AuthorAgeFilesLines
* Version 138.txr-138Kaz Kylheku2016-04-161-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Improve sock-peer documentation.Kaz Kylheku2016-04-161-19/+20
| | | | | | * txr.1: Remove factually incorrect statements that only sockets connected with sock-connect or sock-accept have a peer address. Broadly revise wording.
* Doc for sys:abscond* references nonexistent sym.Kaz Kylheku2016-04-161-1/+1
| | | | | * txr.1: Incorrect reference to sys:return* should of course be to sys:abscond*.
* Notes on glob and exceptions.Kaz Kylheku2016-04-151-0/+19
| | | | | | * txr.1: Document that glob's error-func callback can be terminated by a non-local exit, but may not capture continuations across glob.
* Glob-related variables wrongly documented as special.Kaz Kylheku2016-04-151-1/+1
| | | | | * txr.1: glob-err, glob-mark and others are global lexical variables, not special.
* Adding ftw function.Kaz Kylheku2016-04-151-0/+194
| | | | | | | | | | | | | | * Makefile (ftw.o): Add to OBJS-y conditionally. * configure (have_ftw): New variable. New configure test for nftw. (gen_config_make): Set up have_ftw make variable. * ftw.c, ftw.h: New files. * lib.c (init): Call ftw_init, if compiled in. * txr.1: Documented.
* Macros obtain* and obtain*-block.Kaz Kylheku2016-04-151-0/+76
| | | | | | | | | | * lisplib.c (yield_set_entries): Add obtain* and obtain*-block to autoload list. * share/txr/stdlib/yield.tl (obtain*, obtain*-block): New macros. * txr.1: Documented.
* Fix proper-listp to proper-list-p.Kaz Kylheku2016-04-141-6/+17
| | | | | | | | | | | | | | | | | | | | This is really a gratuitous incompatibility with Common Lisp and other dialects. Let's fix it internally also, but keep the proper-listp function binding for backwards compatibility. * eval.c (dot_to_apply, me_op): Update proper_listp call to proper_list_p. (eval_init): Register proper-list-p to the same C function as proper-listp, and that C function is now called proper_list_p. * lib.c (proper_listp): Renamed to proper_list_p. * lib.h (proper_listp): Declaration updated. * parser.y (define_transform): Update proper_listp call. * txr.1: Replace all occurrences of proper-listp with proper-list-p. Add note explaining the rename situation.
* Remove @(do) from Lisp examples.Kaz Kylheku2016-04-141-17/+15
| | | | * txr.1: example for delay and gen doesn't need @(do).
* Fix incorrect example under umeth.Kaz Kylheku2016-04-141-2/+2
| | | | | * txr.1: Functions bound to variables must be invoked using DWIM brackets or call function.
* New open-socket-pair function.Kaz Kylheku2016-04-141-0/+27
| | | | | | | | | | | * lisplib.c (sock_set_entries): Add open-socket-pair to autoload list. * socket.c (sock_mark_connected, socketpair_wrap): New static functions. (sock_load_init): Register open-socket-pair intrinsic. * txr.1: Documented.
* Adding fmt function.Kaz Kylheku2016-04-141-0/+17
| | | | | | | | * stream.c (fmt): New function. * stream.h (fmt): Declared. * txr.1: Documented.
* Improved window-map doc.Kaz Kylheku2016-04-131-6/+6
| | | | * txr.1: Better wording introducing the semantics.
* Fix wrong documentation for window-map.Kaz Kylheku2016-04-131-7/+5
| | | | | * txr.1: window-map doesn't require the function to return sequences, and doesn't append.
* Formatting in defstruct documentation.Kaz Kylheku2016-04-121-10/+1
| | | | | | * txr.1: remove spurious blank lines before .meIP blocks. After the indented section end, return to the correct indentation with .IP rather than .PP.
* Better handling of dot position function calls.Kaz Kylheku2016-04-111-19/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | The expander now actually produces apply forms for dot position function call and dwim forms. This allows symbol macros to work naturally. * eval.c (sys_apply_s): New symbol variable. (imp_list_to_list, dot_to_apply): New static functions. (expand_forms, expand_forms_lisp1): We now throw an error if a non-nil atom terminates a form, Except in compatibility mode with TXR 137 or less, whereby we emulate the old behavior of not expanding this atom. (do_expand): Perform the dot_to_apply transformation on the arguments of the dwim form. Perform the dot_to_apply transformation on an entire function call form. (eval_init): Initialize sys_apply_s and register sys:apply function (using the same function object that is registered under apply). * txr.1: Documented that both DWIM forms and regular function call forms work as if by a transformation to apply form, removing verbiage which separately described the DWIM handling. Documented that symbol macros work properly in dot position.
* Fix more macro name misspellings in manual.Dave Love2016-04-101-10/+10
| | | | | * txr.1: A few occurrences of .codn misspelled .cond are are fixed and one .cod fixed to .code.
* Allow symbol macro in function call dot position.Kaz Kylheku2016-04-071-0/+14
| | | | | | | | | | * eval.c (expand_forms): If the forms list is an atom, then don't just return it. Try to expand it as a macro. If the macro produces a compound form, diagnose with an exception, otherwise return the expansion. * txr.1: Document the treatment of symbol macros in function call dot position.
* Document improper lists as macro call forms.Kaz Kylheku2016-04-071-0/+36
| | | | | | | | * txr.1: New section: Improper Lists as Macro Calls. This is necessary because the section on Dot Position in Function Calls doesn't cover macros. Macros are simpler, because it's just destructuring of syntax.
* Example formatting under Dot Position in Function Calls.Kaz Kylheku2016-04-071-2/+2
| | | | * txr.1: Just some whitespace for alignment of comments.
* Dot position in function calls described in terms of apply.Kaz Kylheku2016-04-071-21/+29
| | | | | | | | * txr.1: Reduce and simplify the description text under the Dot Position in Function Calls section, giving the semantics via equivalence to apply. The handling of values which are atoms or improper lists is described under apply in a more effective way.
* Mistake in apply example.Kaz Kylheku2016-04-071-1/+1
| | | | * txr.1: Example produces (1 2 3 4), not (1 2 3).
* Fix inappropriate references to tree-bind.Kaz Kylheku2016-04-051-3/+3
| | | | | | * txr.1: Documentation for the tc macro falsely claims that it is based on tree-bind, in the description and example expansion.
* Cramped parenthesis under suspend.Kaz Kylheku2016-04-051-2/+2
| | | | | * txr.1: Fix strange formatting mistake, causing parenthesis to follow a meta symbol with no whitespace.
* Incorrect obtain-block heading.Kaz Kylheku2016-04-051-1/+1
| | | | * txr.1: obtain-block introduced as the obtain-from macro.
* Bugfix: support abstract UNIX socket addresses on Linux.Kaz Kylheku2016-03-311-4/+34
| | | | | | | | | | | | | Making it work as already documented. * socket.c (MIN): New macro. (sockaddr_pack): Use utf8_dup_to_buf to convert Unix socket path to a buffer of UTF-8 bytes, possibly with one or more embedded null bytes. Copy as much of this as fits into the sun_path member of struct sockaddr_un. * txr.1: Improve documentation about the abstract names on Linux.
* Define a sock-peer syntactic place.Kaz Kylheku2016-03-311-6/+43
| | | | | | | * share/txr/stdlib/socket.tl (sock-peer): Syntactic place defined, allowing (set (sock-peer sock) addr). * txr.1: Documented sock-peer as accessor and sock-set-peer.
* Version 137.txr-137Kaz Kylheku2016-03-301-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Rewrite intro to delimited continuations.Kaz Kylheku2016-03-291-21/+114
| | | | * txr.1: Concrete example is given, with a detailed walk-through.
* Incorrect typesetting for suspend macro syntax.Kaz Kylheku2016-03-291-1/+1
| | | | | * txr.1: Wrong troff macro used for syntax of suspend macro, rendering it invisible.
* Doc restructuring: Filesystem Access seection gone.Kaz Kylheku2016-03-281-237/+235
| | | | | | | * txr.1: open-file, open-tail and open-directory moved into Input and Output (Streams) section. remove-path and rename-path moved into System Programming. Filesystem Access section removed.
* New macro: lset.Kaz Kylheku2016-03-281-0/+31
| | | | | | | | | * lisplib.c (place_set_entries): Added "lset" to autoload list. * share/txr/stdlib/place.tl (lset): New macro. * txr.1: Documented lset.
* Adding rightmost item search functions.Kaz Kylheku2016-03-271-1/+79
| | | | | | | | | | | | | | | | | | * eval.c (eval_init): Registered intrinsics rmemq, rmemql, rmemqual, rmember, rmember-if, rposqual, rposql, rposq, rpos, rpos-if, rfind, rfind-if and rsearch. * lib.c (rmemq, rmemql, rmemqual, rmember, rmember-if, rposqual, rposql, rposq, rpos, rpos-if, rfind, rfind-if, rsearch): New functions. (rsearch_list): New static function. (search): Omit unreachable return statement. * lib.h (rmemq, rmemql, rmemqual, rmember, rmember-if, rposqual, rposql, rposq, rpos, rpos-if, rfind, rfind-if, rsearch): Declared. * txr.1: Documented.
* Doc fixes under condlet.Kaz Kylheku2016-03-261-6/+4
| | | | * txr.1: Fix inaccurate wording referring to pairs.
* Methods in time struct: time-local and time-utc.Kaz Kylheku2016-03-241-1/+38
| | | | | | | | | | | * lib.c (time_local_s, time_utc_s): New symbol variables. (time_meth): New static function. (time_init): Initialize new symbol variables. Create the time struct with two static slots, and initialize those static slots to be methods. * txr.1: Introduce "the epoch" term. Document the new methods.
* Mistake in time-string-local doc.Kaz Kylheku2016-03-241-2/+2
| | | | | * txr.1: Fixed wrongly copied and pasted reference to time-string-local and time-string-utc.
* HTML formatting issue in tree-case and tc.Kaz Kylheku2016-03-241-2/+2
| | | | * txr.1: similar stray space removed in two places.
* Stray word removed, and formatting fix.Kaz Kylheku2016-03-241-2/+2
| | | | * txr.1: Under Macro parameter lists again.
* HTML issue in doc.Kaz Kylheku2016-03-241-1/+1
| | | | | | * txr.1: One piece of syntax under the section Macro parameter lists looks fine in a man page rendering and in the PDF, but not in the HTML.
* New semantics for @(if) directive.Kaz Kylheku2016-03-221-35/+45
| | | | | | | | | | | | | | | * eval.h (if_s): Declared. * match.c (v_if): New static function. (dir_tables_init): Register v_if in v_directive_table under if symbol. * parser.y (IF): Token assigned to <lineno> type. (if_clause, elif_clauses_opt, else_clause_opt): New syntactic representation, understood by v_if. * txr.1: Documented if semantics more precisely, dropped the text about it being syntactic sugar for a cases with require, added compatibility note.
* Version 136.txr-136Kaz Kylheku2016-03-201-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Improve documentation of file open modes.Kaz Kylheku2016-03-201-73/+82
| | | | | | | * txr.1: Restructured mode-string under open-file to give the syntax as a grammar, and explain its elements using indented paragraphs. No longer refers user to find documentation on the C fopen function.
* Permissive stream open mode strings.Kaz Kylheku2016-03-191-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is more to this patch than just more permissive mode strings. Now if a socket can be opened with mode "l2" for instance, and these options are effectively applied to the socket-specific "r+b" default, not to "r". * stream.c (parse_mode): New argument specifying a default mode. The syntax is relaxed, allowing previously required elements to be omitted. (normalize_mode): New argument specifying a default mode. Format mode is always called now, because an input string is no longer necessarily a valid fopen string even in cases when it doesn't specify any extensions. (open_file, open_fileno, open_tail, open_command, open_process): Use new normalize_mode argument for defaulting; normalize_mode no longer defaults to "r". * stream.h (stdio_mode_init_trivial): Macro removed. (stdio_mode_init_blank, stdio_mode_init_r, stdio_mode_init_rpb): New initializer macros. (parse_mode, normalize_mode): Declarations updated. * socket.c (sock_accept): In datagram socket case, use new parse_mode argument for defaulting using stdio_mode_init_rpb, rather than overriding a missing string with "r+b". (open_sockfd): Likewise, and use new normalize_mode argument similarly for defaulting the mode on a stream socket. * txr.1: Documented mode string permissiveness.
* Size mode meaningful in datagram sockets.Kaz Kylheku2016-03-191-0/+26
| | | | | | | | | | | | | | | | | | | | | | * socket.c (struct dgram_stream): new rx_max member. (make_dgram_sock_stream): New arguments: a struct stdio_mode, and pointer to prototype dgram socket. If a size is specified in the mode, then use that as rx_max. Otherwise if a prototype socket is specified, use its rx_max as the new socket's rx_max. Otherwise default on 65536. (dgram_get_byte_callback): Use d->rx_max as the capture size, rather than a hard-coded 65536. (sock_accept): Use d->rx_max as capture size for datagram. Parse the mode. Pass the parsed mode to make_dgram_sock_stream, as well as the accepting socket, so it can set up the rx_max for the new socket. (open_sockfd): Parse the mode and pass to make_dgram_sock_stream. * stream.c (parse_mode): Static function becomes extern. * stream.h (parse_mode): Declared. * txr.1: Documented.
* Buffer size digit in file open mode string.Kaz Kylheku2016-03-191-0/+13
| | | | | | | | | | | | | | | | | * streamn.c (struct stdio_handle): New member, buf. (stdio_stream_destroy): Free the stdio_handle's buf. (parse_mode): Handle digit character, converting it to integer value stored in m.buforder. (set_mode_props): Allocate a buffer and install into FILE * stream if the mode specifies a buforder. (make_stdio_stream_common): Initialize buffer to null. * stream.h (struct stdio_mode): New signed bitfield member, buforder. (stdio_mode_init_trivial): Initialize buforder member to -1. * txr.1: Documented size order digit.
* Sockets are r+b by default, not r+.Kaz Kylheku2016-03-181-1/+10
| | | | | | * socket.c (open_sockfd): Default mode string is "r+b". * txr.1: Documented.
* New l and u letters in stream open mode strings.Kaz Kylheku2016-03-181-3/+30
| | | | | | | | | | | | | | * stream.c (parse_mode): Recognize "l" and "u", and set new flags. (set_mode_props): More complicated behavior to integrate the new options with the line mode defaulting behavior of "i". * stream.h (struct stdio_mode): New members unbuf and linebuf. All members become bit fields of width 1. (stdio_mode_init_trivial): Initializers for new members. * txr.1: Documented.
* Support binding in @(repeat)/@(rep) :vars.Kaz Kylheku2016-03-161-6/+35
| | | | | | | | | | | | | | | | * match.c (extract_bindings): Check for (var expr) syntax, evaluate and bind. * match.h (vars_k): Declared. * parser.y (expand_repeat_rep_args): New static function. (repeat_rep_helper): The :counter and :var arguments of repeat/rep must be macro-expanded, since there can be Lisp expressions there. This supports the new feature, but also fixes the bug of :counter (var form) not expanding form. * txr.1: Updated documentation about :vars in @(repeat).
* Timeout parameter in sock-accept.Kaz Kylheku2016-03-151-1/+10
| | | | | | | | | | * socket.c (sock_accept): New third parameter specifying timeout. If a timeout is specified, use the select function to select socket for reading, datagram or stream. (sock_load_init): Update registration of sock-accept intrinsic to three arguments, one optional. * txr.1: Documented sock-accept's timeout parameter.
* Make connect interruptible and support timeout.Kaz Kylheku2016-03-151-1/+10
| | | | | | | | | | * socket.c (to_connect): New static function. (sock_connect): Use to_connect instead of calling connect directly. (lock_load_init): sock-connect intrinsic registration updated to three arguments, one optional. * txr.1: Documented sock-connect timeout.