summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-10-13 19:25:15 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-10-13 19:25:15 -0700
commitfe47cba529cc8688e7073b51ee1c596d5b42bda8 (patch)
tree79de5074fb521064d77bac75a250b2808fc0308b /lib.h
parent17dc6a75c2634be5529915e5030153e28c78832a (diff)
downloadtxr-fe47cba529cc8688e7073b51ee1c596d5b42bda8.tar.gz
txr-fe47cba529cc8688e7073b51ee1c596d5b42bda8.tar.bz2
txr-fe47cba529cc8688e7073b51ee1c596d5b42bda8.zip
* eval.c (eval_init): Register greater function as intrinsic.
* lib.c (gt_f, lt_f): Global variables removed. (greater_f): New variable. (greater): New function. (find_max, pos_max): Use greater_f as default for testfun, rather than gt_f. (find_min, pos_min): Use less_f as default for testfun, rather than lt_f. (obj_init): Remove references to gt_f and lt_f. GC-protect and initialize greater_f. * lib.h (greater_f): Declared. (gt_f, lt_f): Declarations removed. * txr.1: Documented greater, and use of less and greater in pos-min, pos-max, find-min and find-max. * txr.vim: Regenerated.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib.h b/lib.h
index bb58669c..cf1a8d4f 100644
--- a/lib.h
+++ b/lib.h
@@ -378,8 +378,8 @@ extern val nothrow_k, args_k, colon_k, auto_k;
extern val null_string;
extern val null_list; /* (nil) */
-extern val identity_f, equal_f, eql_f, eq_f, gt_f, lt_f, car_f, cdr_f, null_f;
-extern val list_f, less_f;
+extern val identity_f, equal_f, eql_f, eq_f, car_f, cdr_f, null_f;
+extern val list_f, less_f, greater_f;
extern const wchar_t *progname;
extern val prog_string;
@@ -601,6 +601,7 @@ val num_str(val str);
val int_flo(val f);
val flo_int(val i);
val less(val left, val right);
+val greater(val left, val right);
val chrp(val chr);
wchar_t c_chr(val chr);
val chr_isalnum(val ch);