summaryrefslogtreecommitdiffstats
path: root/cadr.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-07-21 22:14:23 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-07-21 22:14:23 -0700
commitf10ed814f895f2527b99fc6a55057617a7750ba7 (patch)
tree7e0c421f9b284f195c8e3fae239ef84463d8f0ad /cadr.h
parent701d5ff8c6a2d4ca6023be345faf4f085db6c689 (diff)
downloadtxr-f10ed814f895f2527b99fc6a55057617a7750ba7.tar.gz
txr-f10ed814f895f2527b99fc6a55057617a7750ba7.tar.bz2
txr-f10ed814f895f2527b99fc6a55057617a7750ba7.zip
Implementing caar, cadr, cdar and friends.
* lib.c (init): Call cadr_init. * lisplib.c (dl_table, set_dlt_entries, dlt_register): Externalize. * lisplib.h (dl_table, set_dlt_entries, dlt_register): Declared. * Makefile (OBJS): Add cadr.o. * cadr.c: New file. * cadr.h: New file. * gencadr.txr: New file. * share/txr/stdlib/cadr.tl: New file. * txr.1: Document cadr accessors.
Diffstat (limited to 'cadr.h')
-rw-r--r--cadr.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/cadr.h b/cadr.h
new file mode 100644
index 00000000..f080da2b
--- /dev/null
+++ b/cadr.h
@@ -0,0 +1,88 @@
+/* Copyright 2009-2015
+ * Kaz Kylheku <kaz@kylheku.com>
+ * Vancouver, Canada
+ * All rights reserved.
+ *
+ * Redistribution of this software in source and binary forms, with or without
+ * modification, is permitted provided that the following two conditions are met.
+ *
+ * Use of this software in any manner constitutes agreement with the disclaimer
+ * which follows the two conditions.
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DAMAGES, HOWEVER CAUSED,
+ * AND UNDER ANY THEORY OF LIABILITY, ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+val caar(val);
+val cadr(val);
+val cdar(val);
+val cddr(val);
+val caaar(val);
+val caadr(val);
+val cadar(val);
+val caddr(val);
+val cdaar(val);
+val cdadr(val);
+val cddar(val);
+val cdddr(val);
+val caaaar(val);
+val caaadr(val);
+val caadar(val);
+val caaddr(val);
+val cadaar(val);
+val cadadr(val);
+val caddar(val);
+val cadddr(val);
+val cdaaar(val);
+val cdaadr(val);
+val cdadar(val);
+val cdaddr(val);
+val cddaar(val);
+val cddadr(val);
+val cdddar(val);
+val cddddr(val);
+val caaaaar(val);
+val caaaadr(val);
+val caaadar(val);
+val caaaddr(val);
+val caadaar(val);
+val caadadr(val);
+val caaddar(val);
+val caadddr(val);
+val cadaaar(val);
+val cadaadr(val);
+val cadadar(val);
+val cadaddr(val);
+val caddaar(val);
+val caddadr(val);
+val cadddar(val);
+val caddddr(val);
+val cdaaaar(val);
+val cdaaadr(val);
+val cdaadar(val);
+val cdaaddr(val);
+val cdadaar(val);
+val cdadadr(val);
+val cdaddar(val);
+val cdadddr(val);
+val cddaaar(val);
+val cddaadr(val);
+val cddadar(val);
+val cddaddr(val);
+val cdddaar(val);
+val cdddadr(val);
+val cddddar(val);
+val cdddddr(val);
+
+void cadr_init(void);