summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-07-12 22:01:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2013-07-12 22:01:17 -0700
commit7513cce876df146917eb747a31e1a3f44344f4bb (patch)
treec3572c232c2675d3fae519b01a975cfaad2af477
parent209e81e4a643db09e5c1645b5fb7568b12e7360b (diff)
downloadtxr-7513cce876df146917eb747a31e1a3f44344f4bb.tar.gz
txr-7513cce876df146917eb747a31e1a3f44344f4bb.tar.bz2
txr-7513cce876df146917eb747a31e1a3f44344f4bb.zip
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.
-rw-r--r--ChangeLog18
-rw-r--r--RELNOTES15
-rwxr-xr-xconfigure2
-rw-r--r--eval.c1
-rw-r--r--txr.127
-rw-r--r--txr.c2
-rw-r--r--txr.vim2
7 files changed, 61 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a5bd0b0..d858e2dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
diff --git a/RELNOTES b/RELNOTES
index b91699c6..88cee54d 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -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
diff --git a/configure b/configure
index 5e7cd866..9df9e7a4 100755
--- a/configure
+++ b/configure
@@ -380,7 +380,7 @@ fi
#
-txr_ver=66
+txr_ver=67
#
# The all important banner.
diff --git a/eval.c b/eval.c
index 1c8664be..3aeeefda 100644
--- a/eval.c
+++ b/eval.c
@@ -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));
diff --git a/txr.1 b/txr.1
index 45dad773..5935fb4a 100644
--- a/txr.1
+++ b/txr.1
@@ -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
diff --git a/txr.c b/txr.c
index 7f5a1bff..f1d10464 100644
--- a/txr.c
+++ b/txr.c
@@ -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;
diff --git a/txr.vim b/txr.vim
index e4264aac..60d84637 100644
--- a/txr.vim
+++ b/txr.vim
@@ -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