From 49ee63ab0b91549ab7f5e320921954928241d9e3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 10 Sep 2015 19:48:49 -0700 Subject: Fix misspelled :toinger filter. The manual documents a filter called :tointeger, but it has never existed. The keyword was misspelled in the source code from the beginning as :toinger. I'm fixing the typo and renaming the filter to :toint at the same time. * filter.c (tointeger_k, toint_k): Former renamed to latter. (filter_init): Initialize toint_k with correctly spelled symbol. Register filter under toint_k. * filter.h (tointeger_k, toint_k): Former renamed to latter. * txr.1: Changed mention of :tointeger to :toint. --- filter.c | 6 +++--- filter.h | 2 +- txr.1 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/filter.c b/filter.c index 1a854810..e8229f24 100644 --- a/filter.c +++ b/filter.c @@ -48,7 +48,7 @@ val filters; val filter_k, lfilt_k, rfilt_k, to_html_k, from_html_k; val upcase_k, downcase_k; val topercent_k, frompercent_k, tourl_k, fromurl_k; -val tonumber_k, tointeger_k, tofloat_k, hextoint_k; +val tonumber_k, toint_k, tofloat_k, hextoint_k; static val make_trie(void) { @@ -697,7 +697,7 @@ void filter_init(void) tourl_k = intern(lit("tourl"), keyword_package); fromurl_k = intern(lit("fromurl"), keyword_package); tonumber_k = intern(lit("tonumber"), keyword_package); - tointeger_k = intern(lit("toinger"), keyword_package); + toint_k = intern(lit("toint"), keyword_package); tofloat_k = intern(lit("tofloat"), keyword_package); hextoint_k = intern(lit("hextoint"), keyword_package); @@ -715,7 +715,7 @@ void filter_init(void) sethash(filters, tourl_k, curry_12_1(func_n2(url_encode), t)); sethash(filters, fromurl_k, curry_12_1(func_n2(url_decode), t)); sethash(filters, tonumber_k, func_n1(num_str)); - sethash(filters, tointeger_k, curry_12_1(func_n2(int_str), nil)); + sethash(filters, toint_k, curry_12_1(func_n2(int_str), nil)); sethash(filters, tofloat_k, func_n1(flo_str)); sethash(filters, hextoint_k, curry_12_1(func_n2(int_str), num_fast(16))); diff --git a/filter.h b/filter.h index 249fe64d..12b4749f 100644 --- a/filter.h +++ b/filter.h @@ -28,7 +28,7 @@ extern val filters; extern val filter_k, lfilt_k, rfilt_k, to_html_k, from_html_k; extern val upcase_k, downcase_k; extern val topercent_k, frompercent_k, tourl_k, fromurl_k; -extern val tonumber_k, tointeger_k, tofloat_k, hextoint_k; +extern val tonumber_k, toint_k, tofloat_k, hextoint_k; val trie_lookup_begin(val trie); val trie_value_at(val node); diff --git a/txr.1 b/txr.1 index cfcc1925..984c68e7 100644 --- a/txr.1 +++ b/txr.1 @@ -7684,7 +7684,7 @@ with a radix of 10. Non-numeric junk results in the object .codn nil . -.coIP :tointeger +.coIP :toint Converts strings to integers as if using .code int-str with a radix of 10. -- cgit v1.2.3