summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-09-29 21:57:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-09-29 21:57:03 -0700
commit389df91392be85e2b30150e20c5c2a98ec6fd05b (patch)
tree05253cbde059ec0bcfb04a774e300f3aa3b8b551 /txr.c
parentf021a78368b5ba841d8d88fec74d75f9f398d647 (diff)
downloadtxr-389df91392be85e2b30150e20c5c2a98ec6fd05b.tar.gz
txr-389df91392be85e2b30150e20c5c2a98ec6fd05b.tar.bz2
txr-389df91392be85e2b30150e20c5c2a98ec6fd05b.zip
Fixes in partition, partition*, split and split*.
Bunch of issues here: broken pre-171 compatibility, non-termination on lazy infinite lists of indices, doc issues. * lib.c (partition_func, split_func, split_star_func): Do the check for negative index values here, with the compat handling for 170 or older. (partition_split_common): Remove code that tries to adjust negative indices, and delete zeros or indices that are still negative after adjustment. The code consumes the entire list of prefixes, so chokes on lazy lists. Also in the compat case, there is complete breakage: the loop doesn't execute, and so out is just nil, and it is taken as the index list. (partition_star_func): Similar change like in partition_func. (partition_star): Similarly to partition_split_common, take out the bogus loop. Also take out loop that tries to remove leading negatives: we cannot do that because we haven't normalized them. * txr.1: Revised doc. Condensed by describing index-list argument in detail under partition. For the other functions, we refer to that one. Conditions for safely handling infinite list of indices spelled out.
Diffstat (limited to 'txr.c')
0 files changed, 0 insertions, 0 deletions