From 20394dfa62464334b202dcce7e592025baf7ffbd Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 3 Apr 2022 10:10:20 -0700 Subject: cons: rename tolisp and toawk functions. The new terminology is box and unbox. --- cppawk-include/cons.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cppawk-include') diff --git a/cppawk-include/cons.h b/cppawk-include/cons.h index ca3bb39..aaea3bf 100644 --- a/cppawk-include/cons.h +++ b/cppawk-include/cons.h @@ -180,8 +180,8 @@ function nump(__obj) } #define nump(obj) ((obj) == 0 || (obj) + 0 != 0) -function tolisp(__raw, - __case_temps) +function box(__raw, + __case_temps) { __case (typecode(__raw)) { __of ("T", "S", "C") @@ -191,14 +191,14 @@ function tolisp(__raw, } } -function toawk(__obj, +function unbox(__obj, __case_temps) { __case (typecode(__obj)) { __of ("T", "S") __cret (substr(__obj, 2)) __of ("C") - __error("toawk: %s looks like a cons", __obj, i) + __error("unbox: %s looks like a cons", __obj, i) __cbreak __otherwise __cret (__obj) @@ -356,10 +356,10 @@ function __slow_equal(__obj1, __obj2, } if (__tc1 == "T") - return toawk(__obj1) == __obj2; + return unbox(__obj1) == __obj2; if (__tc2 == "T") - return __obj1 == toawk(__obj2); + return __obj1 == unbox(__obj2); if (nump(__obj1)) return __obj1 + 0 == __obj2 -- cgit v1.2.3