diff options
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | RELNOTES | 15 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | eval.c | 1 | ||||
-rw-r--r-- | txr.1 | 27 | ||||
-rw-r--r-- | txr.c | 2 | ||||
-rw-r--r-- | txr.vim | 2 |
7 files changed, 61 insertions, 6 deletions
@@ -1,5 +1,21 @@ 2013-07-12 Kaz Kylheku <kaz@kylheku.com> + Version 67 + + * 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. + +2013-07-12 Kaz Kylheku <kaz@kylheku.com> + * txr.vim: Bringing up to date. 2013-06-11 Kaz Kylheku <kaz@kylheku.com> @@ -53,7 +69,7 @@ * lib.c (string_cmp): New function. - * (string_cmp): Declared. + * lib.h (string_cmp): Declared. 2013-05-20 Kaz Kylheku <kaz@kylheku.com> @@ -1,4 +1,19 @@ TXR 66 + 2013-07-12 + + + Features + + - New functions tok-str and string-cmp. + + - Internal lazy string functions exposed as intrinsics. + + - New pattern language directive: @(require ...). + + + + + TXR 66 2013-05-16 @@ -380,7 +380,7 @@ fi # -txr_ver=66 +txr_ver=67 # # The all important banner. @@ -2371,6 +2371,7 @@ void eval_init(void) reg_fun(intern(lit("tok-str"), user_package), func_n3o(tok_str, 1)); reg_fun(intern(lit("list-str"), user_package), func_n1(list_str)); reg_fun(intern(lit("trim-str"), user_package), func_n1(trim_str)); + reg_fun(intern(lit("string-cmp"), user_package), func_n2(string_cmp)); reg_fun(intern(lit("string-lt"), user_package), func_n2(string_lt)); reg_fun(intern(lit("int-str"), user_package), func_n2o(int_str, 1)); reg_fun(intern(lit("flo-str"), user_package), func_n1(flo_str)); @@ -21,9 +21,9 @@ .\"IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED .\"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -.TH "TXR" 1 2013-05-16 "Utility Commands" "Txr Text Processing Language" "Kaz Kylheku" +.TH "TXR" 1 2013-07-12 "Utility Commands" "Txr Text Processing Language" "Kaz Kylheku" .SH NAME -txr \- text processing language (version 66) +txr \- text processing language (version 67) .SH SYNOPSIS .B txr [ options ] query-file { data-file }* .sp @@ -8178,6 +8178,29 @@ These functions can be used to test such as string whether it is longer or shorter than a given length, without forcing the string beyond that length. +.SS Function string-cmp + +.TP +Syntax: + + (string-cmp <left-string> <right-string>) + +.TP +Semantics: + +The string-cmp function returns a negative integer if <left-string> +is lexicographically prior to <right-string>, and a positive integer +if the reverse situation is the case. Otherwise the strings are equal +and zero is returned. + +If either or both of the strings are lazy, then they are only forced to the +minimum extent necessary for the function to reach a conclusion and return the +appropriate value, since there is no need to look beyond the first character +position in which they differ. + +The lexicographic ordering is naive, based on the character code point +values in Unicode taken as integers, without regard for locale-specific +collation orders. .SH VECTORS @@ -43,7 +43,7 @@ #include "debug.h" #include "txr.h" -const wchli_t *version = wli("66"); +const wchli_t *version = wli("67"); const wchar_t *progname = L"txr"; const wchar_t *spec_file = L"stdin"; val self_path; @@ -74,7 +74,7 @@ syn keyword txl_keyword contained mkstring copy-str upcase-str downcase-str stri syn keyword txl_keyword contained stringp lazy-stringp length-str search-str search-str-tree syn keyword txl_keyword contained match-str match-str-tree syn keyword txl_keyword contained sub-str cat-str split-str replace-str -syn keyword txl_keyword contained split-str-set list-str trim-str tok-str +syn keyword txl_keyword contained split-str-set list-str trim-str tok-str string-cmp syn keyword txl_keyword contained string-lt int-str flo-str num-str int-flo flo-int syn keyword txl_keyword contained chrp chr-isalnum chr-isalpha syn keyword txl_keyword contained chr-isascii chr-iscntrl chr-isdigit chr-isgraph |