diff --git a/README.md b/README.md
index 4d08b11..8a44c6e 100644
--- a/README.md
+++ b/README.md
@@ -210,19 +210,15 @@ ic3> a * a
ic3>
```
+#### Lists
-### c3s
-
-Script interpreter. Works the same as ic3 but is not interactive.
-
-## New in this release
-### Lists are now marked with brackets `[]`
+Lists are marked with brackets `[]`.
Regular lists can be :
- - an element and a list : `[1 | [2]]`
+ - an element and a list : `[1 | [2]]` → `[1, 2]`
- multiple elements : `[1, 2, 3]`
- - multiple elements and a list : `[1, 2 | [3, 4]]`
+ - multiple elements and a list : `[1, 2 | [3, 4]]` → `[1, 2, 3, 4]`
- the empty list : `[]`
Regular lists end with the empty list : `[1] == [1 | []]`.
@@ -236,6 +232,11 @@ the next list pointer is an arbitrary form. E.g. :
All these list formats are supported in pattern matching.
+### c3s
+
+Script interpreter. Works the same as ic3 but is not interactive.
+
+
## TODO
- libc3
@@ -253,13 +254,21 @@ All these list formats are supported in pattern matching.
- math
- fractions
- floating point numbers (decimals)
- - maps (anonymous struct)
- - access
+ - maps
+ - A map maps keys to values according to an internal hash table.
+ - `%{a: 1, 2 => 3}`
+ - access (get symbol)
- get
- put
- machine word alignment (from rtbuf)
- structs
- - as tagged maps
+ - structs are a special kind of map with their fields sorted according to a spec.
+ - as a `s_map` and `s_struct_spec` accessible through their module name.
+ - `defstruct`
+ - `%Module{a: 1, b: 2}`
+ - access
+ - get
+ - put
- enums
- unions
- errors (setjmp, longjmp)
diff --git a/libc3/buf_inspect.c b/libc3/buf_inspect.c
index a29743f..46dec06 100644
--- a/libc3/buf_inspect.c
+++ b/libc3/buf_inspect.c
@@ -1221,6 +1221,59 @@ sw buf_inspect_list_size (const s_list **list)
return result;
}
+sw buf_inspect_map (s_buf *buf, const s_map *map)
+{
+ uw i = 0;
+ s_tag *k;
+ sw r;
+ sw result = 0;
+ assert(buf);
+ assert(map);
+ if ((r = buf_write_1(buf, "%{")) < 0)
+ return r;
+ result += r;
+ while (i < map->count) {
+ k = map->keys + i;
+ if (k->type == TAG_SYM) {
+ if ((r = buf_write_1(buf, k->data.sym->str.ptr.ps8)) < 0)
+ return r;
+ result += r;
+ if ((r = buf_write_1(buf, ": ")) < 0)
+ return r;
+ result += r;
+ }
+ else {
+ if ((r = buf_inspect_tag(buf, map->keys + i)) < 0)
+ return r;
+ result += r;
+ if ((r = buf_write_1(buf, " => ")) < 0)
+ return r;
+ result += r;
+ }
+ if ((r = buf_inspect_tag(buf, map->values + i)) < 0)
+ return r;
+ result += r;
+ i++;
+ if (i < map->count) {
+ if ((r = buf_write_1(buf, ", ")) < 0)
+ return r;
+ result += r;
+ }
+ }
+ if ((r = buf_write_1(buf, "}")) < 0)
+ return r;
+ result += r;
+ return result;
+}
+
+sw buf_inspect_map_size (const s_map *map)
+{
+ assert(map);
+ assert(! "buf_inspect_map_size: not implemented");
+ (void) map;
+ return -1;
+}
+
sw buf_inspect_ptag (s_buf *buf, const p_tag *ptag)
{
sw r;
@@ -1632,6 +1685,7 @@ sw buf_inspect_tag (s_buf *buf, const s_tag *tag)
case TAG_INTEGER: return buf_inspect_integer(buf, &tag->data.integer);
case TAG_LIST:
return buf_inspect_list(buf, (const s_list **) &tag->data.list);
+ case TAG_MAP: return buf_inspect_map(buf, &tag->data.map);
case TAG_PTAG: return buf_inspect_ptag(buf, &tag->data.ptag);
case TAG_PTR: return buf_inspect_ptr(buf, &tag->data.ptr);
case TAG_QUOTE: return buf_inspect_quote(buf, &tag->data.quote);
@@ -1675,6 +1729,7 @@ sw buf_inspect_tag_size (const s_tag *tag)
return buf_inspect_integer_size(&tag->data.integer);
case TAG_LIST:
return buf_inspect_list_size((const s_list **) &tag->data.list);
+ case TAG_MAP: return buf_inspect_map_size(&tag->data.map);
case TAG_PTAG: return buf_inspect_ptag_size(&tag->data.ptag);
case TAG_PTR: return buf_inspect_ptr_size(&tag->data.ptr);
case TAG_QUOTE: return buf_inspect_quote_size(&tag->data.quote);
@@ -1728,6 +1783,8 @@ sw buf_inspect_tag_type (s_buf *buf, e_tag_type type)
return buf_write_1(buf, "Integer");
case TAG_LIST:
return buf_write_1(buf, "List");
+ case TAG_MAP:
+ return buf_write_1(buf, "Map");
case TAG_PTAG:
return buf_write_1(buf, "Ptag");
case TAG_PTR:
@@ -1797,6 +1854,8 @@ sw buf_inspect_tag_type_size (e_tag_type type)
return strlen("Integer");
case TAG_LIST:
return strlen("List");
+ case TAG_MAP:
+ return strlen("Map");
case TAG_PTAG:
return strlen("Ptag");
case TAG_PTR:
diff --git a/libc3/buf_inspect.h b/libc3/buf_inspect.h
index 5fedd96..cabda92 100644
--- a/libc3/buf_inspect.h
+++ b/libc3/buf_inspect.h
@@ -96,6 +96,8 @@ sw buf_inspect_integer_size (const s_integer *x);
sw buf_inspect_list (s_buf *buf, const s_list **list);
sw buf_inspect_list_paren (s_buf *buf, const s_list **list);
sw buf_inspect_list_size (const s_list **list);
+sw buf_inspect_map (s_buf *buf, const s_map *map);
+sw buf_inspect_map_size (const s_map *map);
sw buf_inspect_paren_sym (s_buf *buf, const s_sym *sym);
sw buf_inspect_paren_sym_size (const s_sym *sym);
sw buf_inspect_ptag (s_buf *buf, const p_tag *ptag);
diff --git a/libc3/buf_parse.c b/libc3/buf_parse.c
index 94e33db..af65af5 100644
--- a/libc3/buf_parse.c
+++ b/libc3/buf_parse.c
@@ -29,6 +29,7 @@
#include "ident.h"
#include "integer.h"
#include "list.h"
+#include "map.h"
#include "operator.h"
#include "str.h"
#include "sym.h"
@@ -1846,6 +1847,142 @@ sw buf_parse_list_paren (s_buf *buf, s_list **list)
return r;
}
+sw buf_parse_map (s_buf *buf, s_map *dest)
+{
+ s_list *keys;
+ s_list **keys_end;
+ sw r;
+ sw result = 0;
+ s_buf_save save;
+ s_list *values;
+ s_list **values_end;
+ buf_save_init(buf, &save);
+ if ((r = buf_read_1(buf, "%{")) <= 0)
+ goto clean;
+ keys = NULL;
+ keys_end = &keys;
+ values = NULL;
+ values_end = &values;
+ if ((r = buf_parse_comments(buf)) < 0)
+ goto restore;
+ result += r;
+ if ((r = buf_ignore_spaces(buf)) < 0)
+ goto restore;
+ result += r;
+ if ((r = buf_read_1(buf, "}")) < 0)
+ goto restore;
+ result += r;
+ while (r == 0) {
+ *keys_end = list_new(NULL, NULL);
+ if ((r = buf_parse_map_key(buf, &(*keys_end)->tag)) <= 0)
+ goto restore;
+ result += r;
+ keys_end = &(*keys_end)->next.data.list;
+ if ((r = buf_parse_comments(buf)) < 0)
+ goto restore;
+ result += r;
+ if ((r = buf_ignore_spaces(buf)) < 0)
+ goto restore;
+ result += r;
+ *values_end = list_new(NULL, NULL);
+ if ((r = buf_parse_tag(buf, &(*values_end)->tag)) <= 0)
+ goto restore;
+ result += r;
+ values_end = &(*values_end)->next.data.list;
+ if ((r = buf_parse_comments(buf)) < 0)
+ goto restore;
+ result += r;
+ if ((r = buf_ignore_spaces(buf)) < 0)
+ goto restore;
+ result += r;
+ if ((r = buf_read_1(buf, "}")) < 0)
+ goto restore;
+ result += r;
+ if (r == 0) {
+ if ((r = buf_read_1(buf, ",")) <= 0)
+ goto restore;
+ result += r;
+ if ((r = buf_parse_comments(buf)) < 0)
+ goto restore;
+ result += r;
+ if ((r = buf_ignore_spaces(buf)) < 0)
+ goto restore;
+ result += r;
+ r = 0;
+ }
+ }
+ if (! map_init_from_lists(dest, keys, values)) {
+ r = 0;
+ goto restore;
+ }
+ r = result;
+ list_delete_all(keys);
+ list_delete_all(values);
+ goto clean;
+ restore:
+ list_delete_all(keys);
+ list_delete_all(values);
+ buf_save_restore_rpos(buf, &save);
+ clean:
+ buf_save_clean(buf, &save);
+ return r;
+}
+
+sw buf_parse_map_key (s_buf *buf, s_tag *dest)
+{
+ sw r;
+ sw result = 0;
+ s_buf_save save;
+ s_str str;
+ s_tag tag;
+ buf_save_init(buf, &save);
+ if ((r = buf_parse_str(buf, &str)) < 0)
+ goto clean;
+ if (r > 0) {
+ result += r;
+ if ((r = buf_read_1(buf, ":")) < 0)
+ goto restore;
+ if (r > 0) {
+ result += r;
+ dest->type = TAG_SYM;
+ dest->data.sym = str_to_sym(&str);
+ str_clean(&str);
+ goto ok;
+ }
+ if ((r = buf_parse_comments(buf)) < 0)
+ goto restore;
+ result += r;
+ if ((r = buf_ignore_spaces(buf)) <= 0)
+ goto restore;
+ result += r;
+ if ((r = buf_read_1(buf, "=>")) <= 0)
+ goto restore;
+ dest->type = TAG_STR;
+ dest->data.str = str;
+ goto ok;
+ }
+ if ((r = buf_parse_tag(buf, &tag)) <= 0)
+ goto restore;
+ if ((r = buf_parse_comments(buf)) < 0)
+ goto restore;
+ result += r;
+ if ((r = buf_ignore_spaces(buf)) <= 0)
+ goto restore;
+ result += r;
+ if ((r = buf_read_1(buf, "=>")) <= 0)
+ goto restore;
+ result += r;
+ *dest = tag;
+ ok:
+ r = result;
+ goto clean;
+ restore:
+ buf_save_restore_rpos(buf, &save);
+ clean:
+ buf_save_clean(buf, &save);
+ return r;
+}
+
sw buf_parse_module_name (s_buf *buf, const s_sym **dest)
{
sw r;
@@ -2415,6 +2552,15 @@ sw buf_parse_tag_list (s_buf *buf, s_tag *dest)
return r;
}
+sw buf_parse_tag_map (s_buf *buf, s_tag *dest)
+{
+ sw r;
+ assert(buf);
+ assert(dest);
+ if ((r = buf_parse_map(buf, &dest->data.map)) > 0)
+ dest->type = TAG_MAP;
+ return r;
+}
sw buf_parse_tag_number (s_buf *buf, s_tag *dest)
{
@@ -2450,6 +2596,7 @@ sw buf_parse_tag_primary (s_buf *buf, s_tag *dest)
(r = buf_parse_tag_call_op_unary(buf, dest)) != 0 ||
(r = buf_parse_tag_bool(buf, dest)) != 0 ||
(r = buf_parse_tag_character(buf, dest)) != 0 ||
+ (r = buf_parse_tag_map(buf, dest)) != 0 ||
(r = buf_parse_tag_str(buf, dest)) != 0 ||
(r = buf_parse_tag_tuple(buf, dest)) != 0 ||
(r = buf_parse_tag_quote(buf, dest)) != 0 ||
diff --git a/libc3/buf_parse.h b/libc3/buf_parse.h
index 21f61d7..184c99f 100644
--- a/libc3/buf_parse.h
+++ b/libc3/buf_parse.h
@@ -79,6 +79,8 @@ sw buf_parse_ident_peek (s_buf *buf, s_ident *dest);
sw buf_parse_integer (s_buf *buf, s_integer *dest);
sw buf_parse_list (s_buf *buf, s_list **dest);
sw buf_parse_list_paren (s_buf *buf, s_list **dest);
+sw buf_parse_map (s_buf *buf, s_map *dest);
+sw buf_parse_map_key (s_buf *buf, s_tag *dest);
sw buf_parse_module_name (s_buf *buf, const s_sym **dest);
sw buf_parse_new_tag (s_buf *buf, s_tag **dest);
sw buf_parse_paren_sym (s_buf *buf, const s_sym **dest);
@@ -103,6 +105,7 @@ sw buf_parse_tag_fn (s_buf *buf, s_tag *dest);
sw buf_parse_tag_ident (s_buf *buf, s_tag *dest);
sw buf_parse_tag_integer (s_buf *buf, s_tag *dest);
sw buf_parse_tag_list (s_buf *buf, s_tag *dest);
+sw buf_parse_tag_map (s_buf *buf, s_tag *map);
sw buf_parse_tag_number (s_buf *buf, s_tag *dest);
sw buf_parse_tag_primary (s_buf *buf, s_tag *dest);
sw buf_parse_tag_quote (s_buf *buf, s_tag *dest);
diff --git a/libc3/configure b/libc3/configure
index 42c2eaa..decc055 100755
--- a/libc3/configure
+++ b/libc3/configure
@@ -34,7 +34,7 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$LO_SOURCES")"
CPPFLAGS="${CPPFLAGS:=}"
ENV_CFLAGS="${CFLAGS:=}"
DEFAULT_CFLAGS="-O2 -pipe"
-LDFLAGS="--shared -no-undefined ${LDFLAGS}"
+LDFLAGS="--shared --no-undefined ${LDFLAGS}"
LIBS="${LIBS} -lm -pthread -rpath ${PREFIX}/lib"
# Common config for all targets
diff --git a/libc3/env.c b/libc3/env.c
index 8dc3822..5cf90e5 100644
--- a/libc3/env.c
+++ b/libc3/env.c
@@ -39,6 +39,7 @@
#include "ident.h"
#include "io.h"
#include "list.h"
+#include "map.h"
#include "module.h"
#include "str.h"
#include "tag.h"
@@ -546,6 +547,29 @@ bool env_eval_list (s_env *env, const s_list *list, s_tag *dest)
return false;
}
+bool env_eval_map (s_env *env, const s_map *map, s_tag *dest)
+{
+ s_map tmp;
+ uw i = 0;
+ assert(env);
+ assert(map);
+ assert(dest);
+ if (! map_copy(map, &tmp))
+ return false;
+ while (i < map->count) {
+ if (! env_eval_tag(env, map->keys + i, tmp.keys + i) ||
+ ! env_eval_tag(env, map->values + i, tmp.values + i))
+ goto ko;
+ i++;
+ }
+ dest->type = TAG_MAP;
+ dest->data.map = tmp;
+ return true;
+ ko:
+ map_clean(&tmp);
+ return false;
+}
+
bool env_eval_progn (s_env *env, const s_list *program, s_tag *dest)
{
const s_list *next;
@@ -590,6 +614,8 @@ bool env_eval_tag (s_env *env, const s_tag *tag, s_tag *dest)
return env_eval_ident(env, &tag->data.ident, dest);
case TAG_LIST:
return env_eval_list(env, tag->data.list, dest);
+ case TAG_MAP:
+ return env_eval_map(env, &tag->data.map, dest);
case TAG_QUOTE:
return env_eval_quote(env, &tag->data.quote, dest);
case TAG_TUPLE:
diff --git a/libc3/env.h b/libc3/env.h
index 1d3cab4..ed4e9a5 100644
--- a/libc3/env.h
+++ b/libc3/env.h
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef ENV_H
-#define ENV_H
+#ifndef LIBC3_ENV_H
+#define LIBC3_ENV_H
#include "types.h"
@@ -46,6 +46,7 @@ bool env_eval_ident (s_env *env, const s_ident *ident,
s_tag *dest);
bool env_eval_list (s_env *env, const s_list *list,
s_tag *dest);
+bool env_eval_map (s_env *env, const s_map *map, s_tag *dest);
bool env_eval_progn (s_env *env, const s_list *program,
s_tag *dest);
bool env_eval_quote (s_env *env, const s_quote *quote,
@@ -75,4 +76,4 @@ void env_error_f (s_env *env, const char *fmt, ...);
void env_error_tag (s_env *env, const s_tag *tag);
void env_longjmp (s_env *env, jmp_buf *jmp_buf);
-#endif /* ENV_H */
+#endif /* LIBC3_ENV_H */
diff --git a/libc3/f32.c b/libc3/f32.c
index 5b32338..e789cca 100644
--- a/libc3/f32.c
+++ b/libc3/f32.c
@@ -20,11 +20,11 @@ f32 f32_cast (s_tag *tag)
{
switch (tag->type) {
case TAG_VOID:
- return 0;
+ return 0.0f;
case TAG_ARRAY:
goto ko;
case TAG_BOOL:
- return tag->data.bool ? 1 : 0;
+ return tag->data.bool ? 1.0f : 0.0f;
case TAG_CALL:
goto ko;
case TAG_CFN:
@@ -32,7 +32,7 @@ f32 f32_cast (s_tag *tag)
case TAG_CHARACTER:
return (f32) tag->data.character;
case TAG_F32:
- return (f32) tag->data.f32;
+ return tag->data.f32;
case TAG_F64:
return (f32) tag->data.f64;
case TAG_FACT:
@@ -62,6 +62,7 @@ f32 f32_cast (s_tag *tag)
case TAG_UW:
return (f32) tag->data.uw;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/f64.c b/libc3/f64.c
index b703203..09fc4b5 100644
--- a/libc3/f64.c
+++ b/libc3/f64.c
@@ -20,11 +20,11 @@ f64 f64_cast (s_tag *tag)
{
switch (tag->type) {
case TAG_VOID:
- return 0;
+ return 0.0;
case TAG_ARRAY:
goto ko;
case TAG_BOOL:
- return tag->data.bool ? 1 : 0;
+ return tag->data.bool ? 1.0 : 0.0;
case TAG_CALL:
goto ko;
case TAG_CFN:
@@ -34,7 +34,7 @@ f64 f64_cast (s_tag *tag)
case TAG_F32:
return (f64) tag->data.f32;
case TAG_F64:
- return (f64) tag->data.f64;
+ return tag->data.f64;
case TAG_FACT:
case TAG_FN:
case TAG_IDENT:
@@ -62,6 +62,7 @@ f64 f64_cast (s_tag *tag)
case TAG_UW:
return (f64) tag->data.uw;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/hash.c b/libc3/hash.c
index 6e341f7..e060f2f 100644
--- a/libc3/hash.c
+++ b/libc3/hash.c
@@ -219,6 +219,19 @@ void hash_update_list (t_hash *hash, const s_list *list)
}
}
+void hash_update_map (t_hash *hash, const s_map *map)
+{
+ uw i = 0;
+ const s8 type[] = "map";
+ hash_update(hash, type, strlen(type));
+ hash_update(hash, &map->count, sizeof(map->count));
+ while (i < map->count) {
+ hash_update_tag(hash, map->keys + i);
+ hash_update_tag(hash, map->values + i);
+ i++;
+ }
+}
+
void hash_update_ptag (t_hash *hash, const p_tag ptag)
{
const s8 type[] = "ptag";
@@ -290,6 +303,7 @@ void hash_update_tag (t_hash *hash, const s_tag *tag)
case TAG_INTEGER:
hash_update_integer(hash, &tag->data.integer); break;
case TAG_LIST: hash_update_list(hash, tag->data.list); break;
+ case TAG_MAP: hash_update_map(hash, &tag->data.map); break;
case TAG_PTAG: hash_update_ptag(hash, tag->data.ptag); break;
case TAG_PTR: hash_update_ptr(hash, &tag->data.ptr); break;
case TAG_QUOTE: hash_update_quote(hash, &tag->data.quote); break;
diff --git a/libc3/hash.h b/libc3/hash.h
index 5dda8ab..89c8487 100644
--- a/libc3/hash.h
+++ b/libc3/hash.h
@@ -36,6 +36,7 @@ void hash_update_fn_clauses (t_hash *hash, const s_fn_clause *clauses);
void hash_update_ident (t_hash *hash, const s_ident *ident);
void hash_update_integer (t_hash *hash, const s_integer *i);
void hash_update_list (t_hash *hash, const s_list *list);
+void hash_update_map (t_hash *hash, const s_map *map);
void hash_update_ptag (t_hash *hash, const p_tag ptag);
void hash_update_ptr (t_hash *hash, const s_ptr *ptr);
void hash_update_quote (t_hash *hash, const s_quote *x);
diff --git a/libc3/integer.c b/libc3/integer.c
index 3e213a6..ad79153 100644
--- a/libc3/integer.c
+++ b/libc3/integer.c
@@ -155,6 +155,7 @@ s_integer * integer_cast (const s_tag *tag, s_integer *dest)
case TAG_UW:
return integer_init_uw(dest, tag->data.uw);
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/map.c b/libc3/map.c
new file mode 100644
index 0000000..47c5f77
--- /dev/null
+++ b/libc3/map.c
@@ -0,0 +1,214 @@
+/* c3
+ * Copyright 2022,2023 kmx.io <contact@kmx.io>
+ *
+ * Permission is hereby granted to use this software granted the above
+ * copyright notice and this permission paragraph are included in all
+ * copies and substantial portions of this software.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+ * PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+ * AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+#include <assert.h>
+#include <err.h>
+#include <stdlib.h>
+#include "compare.h"
+#include "list.h"
+#include "map.h"
+#include "tag.h"
+
+s_tag * map_access (const s_map *map, const s_tag *key, s_tag *value)
+{
+ assert(map);
+ assert(key);
+ assert(value);
+ if (key->type != TAG_SYM) {
+ warnx("map_access: only works with symbol key");
+ return NULL;
+ }
+ return map_get(map, key, value);
+}
+
+void map_clean (s_map *map)
+{
+ assert(map);
+ free(map->keys);
+ free(map->values);
+}
+
+s_map * map_copy (const s_map *src, s_map *dest)
+{
+ uw i = 0;
+ assert(src);
+ assert(dest);
+ map_init(dest, src->count);
+ while (i < src->count) {
+ tag_copy(src->keys + i, dest->keys + i);
+ tag_copy(src->values + i, dest->values + i);
+ i++;
+ }
+ return dest;
+}
+
+void map_delete (s_map *map)
+{
+ assert(map);
+ map_clean(map);
+ free(map);
+}
+
+s_tag * map_get (const s_map *map, const s_tag *key, s_tag *value)
+{
+ uw i = 0;
+ while (i < map->count) {
+ if (compare_tag(key, map->keys + i) == 0)
+ return tag_copy(map->values + i, value);
+ i++;
+ }
+ return NULL;
+}
+
+s_map * map_init (s_map *map, uw count)
+{
+ assert(map);
+ map->count = count;
+ map->keys = calloc(count, sizeof(s_tag));
+ map->values = calloc(count, sizeof(s_tag));
+ return map;
+}
+
+s_map * map_init_from_lists (s_map *map, const s_list *keys,
+ const s_list *values)
+{
+ sw i = 0;
+ const s_list *k;
+ sw len;
+ const s_list *v;
+ assert(map);
+ if ((len = list_length(keys)) != list_length(values)) {
+ warnx("map_init_from_lists: list length don't match");
+ return NULL;
+ }
+ map_init(map, len);
+ k = keys;
+ v = values;
+ while (i < len) {
+ if (! tag_copy(&k->tag, map->keys + i) ||
+ ! tag_copy(&v->tag, map->values + i))
+ goto ko;
+ k = list_next(k);
+ v = list_next(v);
+ i++;
+ }
+ if (! map_sort(map))
+ goto ko;
+ return map;
+ ko:
+ map_clean(map);
+ return NULL;
+}
+
+s_map * map_new (uw count)
+{
+ s_map *map;
+ if (! (map = malloc(sizeof(s_map)))) {
+ warn("map_new");
+ return NULL;
+ }
+ return map_init(map, count);
+}
+
+s_map * map_new_from_lists (const s_list *keys, const s_list *values)
+{
+ s_map *map;
+ if (! (map = malloc(sizeof(s_map)))) {
+ warn("map_new");
+ return NULL;
+ }
+ return map_init_from_lists(map, keys, values);
+}
+
+s_map * map_set (s_map *map, const s_tag *key, const s_tag *value)
+{
+ uw i = 0;
+ while (i < map->count) {
+ if (compare_tag(key, map->keys + i) == 0) {
+ if (! tag_copy(value, map->values + i))
+ return NULL;
+ return map;
+ }
+ i++;
+ }
+ return NULL;
+}
+
+/* bubble sort */
+s_map * map_sort (s_map *map)
+{
+ uw i;
+ uw j;
+ s_tag k;
+ s_tag v;
+ i = map->count;
+ while (i > 0) {
+ i--;
+ j = 1;
+ while (j <= i) {
+ if (compare_tag(map->keys + j, map->keys + (j - 1)) < 0) {
+ k = map->keys[j];
+ v = map->values[j];
+ map->keys[j] = map->keys[j - 1];
+ map->values[j] = map->values[j - 1];
+ map->keys[j - 1] = k;
+ map->values[j - 1] = v;
+ }
+ j++;
+ }
+ }
+ return map;
+}
+
+s_map * map_update (const s_map *map, const s_tag *key,
+ const s_tag *value, s_map *dest)
+{
+ s_map tmp;
+ uw i = 0;
+ map_copy(map, &tmp);
+ while (i < map->count) {
+ if (compare_tag(key, map->keys + i) == 0) {
+ if (! tag_copy(value, map->values + i))
+ goto ko;
+ *dest = tmp;
+ return dest;
+ }
+ i++;
+ }
+ ko:
+ map_clean(&tmp);
+ return NULL;
+}
+
+s_map * map_update_list (const s_map *map, const s_list *alist, s_map *dest)
+{
+ const s_list *i;
+ s_map tmp;
+ assert(map);
+ map_copy(map, &tmp);
+ i = alist;
+ while (i) {
+ assert(i->tag.type == TAG_TUPLE && i->tag.data.tuple.count == 2);
+ if (i->tag.type != TAG_TUPLE || i->tag.data.tuple.count != 2) {
+ warnx("map_update_list: not an associative list");
+ goto ko;
+ }
+ if (! map_set(&tmp, i->tag.data.tuple.tag, i->tag.data.tuple.tag + 1))
+ goto ko;
+ i = list_next(i);
+ }
+ *dest = tmp;
+ return dest;
+ ko:
+ map_clean(&tmp);
+ return NULL;
+}
diff --git a/libc3/map.h b/libc3/map.h
new file mode 100644
index 0000000..355ea6f
--- /dev/null
+++ b/libc3/map.h
@@ -0,0 +1,44 @@
+/* c3
+ * Copyright 2022,2023 kmx.io <contact@kmx.io>
+ *
+ * Permission is hereby granted to use this software granted the above
+ * copyright notice and this permission paragraph are included in all
+ * copies and substantial portions of this software.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+ * PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+ * AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+#ifndef LIBC3_MAP_H
+#define LIBC3_MAP_H
+
+#include "types.h"
+
+/* Stack allocation compatible functions, call map_clean after use. */
+void map_clean (s_map *map);
+s_map * map_init (s_map *map, uw size);
+s_map * map_init_from_lists (s_map *map, const s_list *keys,
+ const s_list *values);
+
+/* Heap allocation functions, call map_delete after use. */
+void map_delete (s_map *map);
+s_map * map_new (uw size);
+s_map * map_new_from_lists (const s_list *keys, const s_list *values);
+
+/* Modifiers */
+s_map * map_set (s_map *map, const s_tag *key, const s_tag *value);
+s_map * map_sort (s_map *map);
+
+/* Observers */
+s_map * map_copy (const s_map *src, s_map *dest);
+
+/* Operators */
+s_tag * map_access (const s_map *map, const s_tag *key, s_tag *value);
+s_tag * map_get (const s_map *map, const s_tag *key, s_tag *dest);
+s_map * map_update (const s_map *map, const s_tag *key,
+ const s_tag *value, s_map *dest);
+s_map * map_update_list (const s_map *map, const s_list *alist,
+ s_map *dest);
+
+#endif /* LIBC3_MAP_H */
diff --git a/libc3/s.c.in b/libc3/s.c.in
index b2d0ed4..ea7f372 100644
--- a/libc3/s.c.in
+++ b/libc3/s.c.in
@@ -79,6 +79,7 @@ s_bits$ * s_bits$_cast (s_tag *tag, s_bits$ *dest)
*dest = (s_bits$) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/s16.c b/libc3/s16.c
index ca14bd7..e73d109 100644
--- a/libc3/s16.c
+++ b/libc3/s16.c
@@ -79,6 +79,7 @@ s16 * s16_cast (s_tag *tag, s16 *dest)
*dest = (s16) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/s32.c b/libc3/s32.c
index bf16690..2c8aa5b 100644
--- a/libc3/s32.c
+++ b/libc3/s32.c
@@ -79,6 +79,7 @@ s32 * s32_cast (s_tag *tag, s32 *dest)
*dest = (s32) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/s64.c b/libc3/s64.c
index cdeb692..604ab1c 100644
--- a/libc3/s64.c
+++ b/libc3/s64.c
@@ -79,6 +79,7 @@ s64 * s64_cast (s_tag *tag, s64 *dest)
*dest = (s64) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/s8.c b/libc3/s8.c
index e99c186..7618723 100644
--- a/libc3/s8.c
+++ b/libc3/s8.c
@@ -79,6 +79,7 @@ s8 * s8_cast (s_tag *tag, s8 *dest)
*dest = (s8) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/sources.mk b/libc3/sources.mk
index cfaf36f..7c2006b 100644
--- a/libc3/sources.mk
+++ b/libc3/sources.mk
@@ -104,6 +104,7 @@ HEADERS = \
io.h \
list.h \
log.h \
+ map.h \
module.h \
operator.h \
ptag.h \
@@ -242,6 +243,7 @@ SOURCES = \
license.c \
list.c \
log.c \
+ map.c \
module.c \
operator.c \
ptag.c \
@@ -378,6 +380,7 @@ LO_SOURCES = \
license.c \
list.c \
log.c \
+ map.c \
module.c \
operator.c \
ptag.c \
diff --git a/libc3/sources.sh b/libc3/sources.sh
index a814dfe..571a6ac 100644
--- a/libc3/sources.sh
+++ b/libc3/sources.sh
@@ -1,4 +1,4 @@
# sources.sh generated by update_sources
-HEADERS='abs.h arg.h array.h binding.h bool.h buf.h buf_file.h buf_inspect.h buf_inspect_s16.h buf_inspect_s16_binary.h buf_inspect_s16_decimal.h buf_inspect_s16_hexadecimal.h buf_inspect_s16_octal.h buf_inspect_s32.h buf_inspect_s32_binary.h buf_inspect_s32_decimal.h buf_inspect_s32_hexadecimal.h buf_inspect_s32_octal.h buf_inspect_s64.h buf_inspect_s64_binary.h buf_inspect_s64_decimal.h buf_inspect_s64_hexadecimal.h buf_inspect_s64_octal.h buf_inspect_s8.h buf_inspect_s8_binary.h buf_inspect_s8_decimal.h buf_inspect_s8_hexadecimal.h buf_inspect_s8_octal.h buf_inspect_sw.h buf_inspect_sw_binary.h buf_inspect_sw_decimal.h buf_inspect_sw_hexadecimal.h buf_inspect_sw_octal.h buf_inspect_u16.h buf_inspect_u16_binary.h buf_inspect_u16_decimal.h buf_inspect_u16_hexadecimal.h buf_inspect_u16_octal.h buf_inspect_u32.h buf_inspect_u32_binary.h buf_inspect_u32_decimal.h buf_inspect_u32_hexadecimal.h buf_inspect_u32_octal.h buf_inspect_u64.h buf_inspect_u64_binary.h buf_inspect_u64_decimal.h buf_inspect_u64_hexadecimal.h buf_inspect_u64_octal.h buf_inspect_u8.h buf_inspect_u8_binary.h buf_inspect_u8_decimal.h buf_inspect_u8_hexadecimal.h buf_inspect_u8_octal.h buf_inspect_uw.h buf_inspect_uw_binary.h buf_inspect_uw_decimal.h buf_inspect_uw_hexadecimal.h buf_inspect_uw_octal.h buf_parse.h buf_parse_c.h buf_parse_s16.h buf_parse_s32.h buf_parse_s64.h buf_parse_s8.h buf_parse_sw.h buf_parse_u16.h buf_parse_u32.h buf_parse_u64.h buf_parse_u8.h buf_parse_uw.h buf_save.h c3.h c3_main.h c_types.h call.h ceiling.h cfn.h character.h compare.h config.h env.h error.h error_handler.h eval.h f32.h f64.h fact.h facts.h facts_cursor.h facts_spec.h facts_spec_cursor.h facts_with.h facts_with_cursor.h file.h float.h fn.h fn_clause.h frame.h hash.h ident.h integer.h io.h list.h log.h module.h operator.h ptag.h quote.h s16.h s32.h s64.h s8.h sequence.h set__fact.h set__tag.h set_cursor__fact.h set_cursor__tag.h set_item__fact.h set_item__tag.h sha1.h sign.h skiplist__fact.h skiplist_node__fact.h str.h sw.h sym.h tag.h time.h timespec.h tuple.h type.h types.h u16.h u32.h u64.h u8.h ucd.h uw.h var.h '
-SOURCES='abs.c arg.c array.c binding.c bool.c buf.c buf_file.c buf_inspect.c buf_inspect_s16.c buf_inspect_s16_binary.c buf_inspect_s16_decimal.c buf_inspect_s16_hexadecimal.c buf_inspect_s16_octal.c buf_inspect_s32.c buf_inspect_s32_binary.c buf_inspect_s32_decimal.c buf_inspect_s32_hexadecimal.c buf_inspect_s32_octal.c buf_inspect_s64.c buf_inspect_s64_binary.c buf_inspect_s64_decimal.c buf_inspect_s64_hexadecimal.c buf_inspect_s64_octal.c buf_inspect_s8.c buf_inspect_s8_binary.c buf_inspect_s8_decimal.c buf_inspect_s8_hexadecimal.c buf_inspect_s8_octal.c buf_inspect_sw.c buf_inspect_sw_binary.c buf_inspect_sw_decimal.c buf_inspect_sw_hexadecimal.c buf_inspect_sw_octal.c buf_inspect_u16.c buf_inspect_u16_binary.c buf_inspect_u16_decimal.c buf_inspect_u16_hexadecimal.c buf_inspect_u16_octal.c buf_inspect_u32.c buf_inspect_u32_binary.c buf_inspect_u32_decimal.c buf_inspect_u32_hexadecimal.c buf_inspect_u32_octal.c buf_inspect_u64.c buf_inspect_u64_binary.c buf_inspect_u64_decimal.c buf_inspect_u64_hexadecimal.c buf_inspect_u64_octal.c buf_inspect_u8.c buf_inspect_u8_binary.c buf_inspect_u8_decimal.c buf_inspect_u8_hexadecimal.c buf_inspect_u8_octal.c buf_inspect_uw.c buf_inspect_uw_binary.c buf_inspect_uw_decimal.c buf_inspect_uw_hexadecimal.c buf_inspect_uw_octal.c buf_parse.c buf_parse_c.c buf_parse_s16.c buf_parse_s32.c buf_parse_s64.c buf_parse_s8.c buf_parse_sw.c buf_parse_u16.c buf_parse_u32.c buf_parse_u64.c buf_parse_u8.c buf_parse_uw.c buf_save.c c3.c call.c ceiling.c cfn.c character.c compare.c env.c error.c error_handler.c eval.c f32.c f64.c fact.c facts.c facts_cursor.c facts_spec.c facts_spec_cursor.c facts_with.c facts_with_cursor.c file.c fn.c fn_clause.c frame.c hash.c ident.c integer.c io.c license.c list.c log.c module.c operator.c ptag.c quote.c s16.c s32.c s64.c s8.c sequence.c set__fact.c set__tag.c set_cursor__fact.c set_cursor__tag.c set_item__fact.c set_item__tag.c sign.c skiplist__fact.c skiplist_node__fact.c str.c sw.c sym.c tag.c time.c timespec.c tuple.c type.c u16.c u32.c u64.c u8.c ucd.c uw.c var.c '
-LO_SOURCES='abs.c arg.c array.c binding.c bool.c buf.c buf_file.c buf_inspect.c buf_inspect_s16.c buf_inspect_s16_binary.c buf_inspect_s16_decimal.c buf_inspect_s16_hexadecimal.c buf_inspect_s16_octal.c buf_inspect_s32.c buf_inspect_s32_binary.c buf_inspect_s32_decimal.c buf_inspect_s32_hexadecimal.c buf_inspect_s32_octal.c buf_inspect_s64.c buf_inspect_s64_binary.c buf_inspect_s64_decimal.c buf_inspect_s64_hexadecimal.c buf_inspect_s64_octal.c buf_inspect_s8.c buf_inspect_s8_binary.c buf_inspect_s8_decimal.c buf_inspect_s8_hexadecimal.c buf_inspect_s8_octal.c buf_inspect_sw.c buf_inspect_sw_binary.c buf_inspect_sw_decimal.c buf_inspect_sw_hexadecimal.c buf_inspect_sw_octal.c buf_inspect_u16.c buf_inspect_u16_binary.c buf_inspect_u16_decimal.c buf_inspect_u16_hexadecimal.c buf_inspect_u16_octal.c buf_inspect_u32.c buf_inspect_u32_binary.c buf_inspect_u32_decimal.c buf_inspect_u32_hexadecimal.c buf_inspect_u32_octal.c buf_inspect_u64.c buf_inspect_u64_binary.c buf_inspect_u64_decimal.c buf_inspect_u64_hexadecimal.c buf_inspect_u64_octal.c buf_inspect_u8.c buf_inspect_u8_binary.c buf_inspect_u8_decimal.c buf_inspect_u8_hexadecimal.c buf_inspect_u8_octal.c buf_inspect_uw.c buf_inspect_uw_binary.c buf_inspect_uw_decimal.c buf_inspect_uw_hexadecimal.c buf_inspect_uw_octal.c buf_parse.c buf_parse_c.c buf_parse_s16.c buf_parse_s32.c buf_parse_s64.c buf_parse_s8.c buf_parse_sw.c buf_parse_u16.c buf_parse_u32.c buf_parse_u64.c buf_parse_u8.c buf_parse_uw.c buf_save.c c3.c call.c ceiling.c cfn.c character.c compare.c env.c error.c error_handler.c eval.c f32.c f64.c fact.c facts.c facts_cursor.c facts_spec.c facts_spec_cursor.c facts_with.c facts_with_cursor.c file.c fn.c fn_clause.c frame.c hash.c ident.c integer.c io.c license.c list.c log.c module.c operator.c ptag.c quote.c s16.c s32.c s64.c s8.c sequence.c set__fact.c set__tag.c set_cursor__fact.c set_cursor__tag.c set_item__fact.c set_item__tag.c sign.c skiplist__fact.c skiplist_node__fact.c str.c sw.c sym.c tag.c time.c timespec.c tuple.c type.c u16.c u32.c u64.c u8.c ucd.c uw.c var.c ../libtommath/bn_cutoffs.c ../libtommath/bn_mp_2expt.c ../libtommath/bn_mp_abs.c ../libtommath/bn_mp_add.c ../libtommath/bn_mp_add_d.c ../libtommath/bn_mp_and.c ../libtommath/bn_mp_clamp.c ../libtommath/bn_mp_clear.c ../libtommath/bn_mp_clear_multi.c ../libtommath/bn_mp_cmp.c ../libtommath/bn_mp_cmp_d.c ../libtommath/bn_mp_cmp_mag.c ../libtommath/bn_mp_cnt_lsb.c ../libtommath/bn_mp_complement.c ../libtommath/bn_mp_copy.c ../libtommath/bn_mp_count_bits.c ../libtommath/bn_mp_div.c ../libtommath/bn_mp_div_2.c ../libtommath/bn_mp_div_2d.c ../libtommath/bn_mp_div_3.c ../libtommath/bn_mp_div_d.c ../libtommath/bn_mp_dr_is_modulus.c ../libtommath/bn_mp_dr_reduce.c ../libtommath/bn_mp_dr_setup.c ../libtommath/bn_mp_error_to_string.c ../libtommath/bn_mp_exch.c ../libtommath/bn_mp_exptmod.c ../libtommath/bn_mp_gcd.c ../libtommath/bn_mp_get_double.c ../libtommath/bn_mp_get_i32.c ../libtommath/bn_mp_get_i64.c ../libtommath/bn_mp_get_mag_u32.c ../libtommath/bn_mp_get_mag_u64.c ../libtommath/bn_mp_grow.c ../libtommath/bn_mp_init.c ../libtommath/bn_mp_init_copy.c ../libtommath/bn_mp_init_multi.c ../libtommath/bn_mp_init_size.c ../libtommath/bn_mp_invmod.c ../libtommath/bn_mp_lcm.c ../libtommath/bn_mp_lshd.c ../libtommath/bn_mp_mod.c ../libtommath/bn_mp_mod_2d.c ../libtommath/bn_mp_montgomery_calc_normalization.c ../libtommath/bn_mp_montgomery_reduce.c ../libtommath/bn_mp_montgomery_setup.c ../libtommath/bn_mp_mul.c ../libtommath/bn_mp_mul_2.c ../libtommath/bn_mp_mul_2d.c ../libtommath/bn_mp_mul_d.c ../libtommath/bn_mp_mulmod.c ../libtommath/bn_mp_neg.c ../libtommath/bn_mp_or.c ../libtommath/bn_mp_radix_size.c ../libtommath/bn_mp_reduce.c ../libtommath/bn_mp_reduce_2k.c ../libtommath/bn_mp_reduce_2k_l.c ../libtommath/bn_mp_reduce_2k_setup.c ../libtommath/bn_mp_reduce_2k_setup_l.c ../libtommath/bn_mp_reduce_is_2k.c ../libtommath/bn_mp_reduce_is_2k_l.c ../libtommath/bn_mp_reduce_setup.c ../libtommath/bn_mp_rshd.c ../libtommath/bn_mp_set.c ../libtommath/bn_mp_set_double.c ../libtommath/bn_mp_set_i32.c ../libtommath/bn_mp_set_i64.c ../libtommath/bn_mp_set_l.c ../libtommath/bn_mp_set_u32.c ../libtommath/bn_mp_set_u64.c ../libtommath/bn_mp_set_ul.c ../libtommath/bn_mp_sqr.c ../libtommath/bn_mp_sqrt.c ../libtommath/bn_mp_sub.c ../libtommath/bn_mp_sub_d.c ../libtommath/bn_mp_xor.c ../libtommath/bn_mp_zero.c ../libtommath/bn_s_mp_add.c ../libtommath/bn_s_mp_balance_mul.c ../libtommath/bn_s_mp_exptmod.c ../libtommath/bn_s_mp_exptmod_fast.c ../libtommath/bn_s_mp_invmod_fast.c ../libtommath/bn_s_mp_invmod_slow.c ../libtommath/bn_s_mp_karatsuba_mul.c ../libtommath/bn_s_mp_karatsuba_sqr.c ../libtommath/bn_s_mp_montgomery_reduce_fast.c ../libtommath/bn_s_mp_mul_digs.c ../libtommath/bn_s_mp_mul_digs_fast.c ../libtommath/bn_s_mp_mul_high_digs.c ../libtommath/bn_s_mp_mul_high_digs_fast.c ../libtommath/bn_s_mp_rand_platform.c ../libtommath/bn_s_mp_sqr.c ../libtommath/bn_s_mp_sqr_fast.c ../libtommath/bn_s_mp_sub.c ../libtommath/bn_s_mp_toom_mul.c ../libtommath/bn_s_mp_toom_sqr.c '
+HEADERS='abs.h arg.h array.h binding.h bool.h buf.h buf_file.h buf_inspect.h buf_inspect_s16.h buf_inspect_s16_binary.h buf_inspect_s16_decimal.h buf_inspect_s16_hexadecimal.h buf_inspect_s16_octal.h buf_inspect_s32.h buf_inspect_s32_binary.h buf_inspect_s32_decimal.h buf_inspect_s32_hexadecimal.h buf_inspect_s32_octal.h buf_inspect_s64.h buf_inspect_s64_binary.h buf_inspect_s64_decimal.h buf_inspect_s64_hexadecimal.h buf_inspect_s64_octal.h buf_inspect_s8.h buf_inspect_s8_binary.h buf_inspect_s8_decimal.h buf_inspect_s8_hexadecimal.h buf_inspect_s8_octal.h buf_inspect_sw.h buf_inspect_sw_binary.h buf_inspect_sw_decimal.h buf_inspect_sw_hexadecimal.h buf_inspect_sw_octal.h buf_inspect_u16.h buf_inspect_u16_binary.h buf_inspect_u16_decimal.h buf_inspect_u16_hexadecimal.h buf_inspect_u16_octal.h buf_inspect_u32.h buf_inspect_u32_binary.h buf_inspect_u32_decimal.h buf_inspect_u32_hexadecimal.h buf_inspect_u32_octal.h buf_inspect_u64.h buf_inspect_u64_binary.h buf_inspect_u64_decimal.h buf_inspect_u64_hexadecimal.h buf_inspect_u64_octal.h buf_inspect_u8.h buf_inspect_u8_binary.h buf_inspect_u8_decimal.h buf_inspect_u8_hexadecimal.h buf_inspect_u8_octal.h buf_inspect_uw.h buf_inspect_uw_binary.h buf_inspect_uw_decimal.h buf_inspect_uw_hexadecimal.h buf_inspect_uw_octal.h buf_parse.h buf_parse_c.h buf_parse_s16.h buf_parse_s32.h buf_parse_s64.h buf_parse_s8.h buf_parse_sw.h buf_parse_u16.h buf_parse_u32.h buf_parse_u64.h buf_parse_u8.h buf_parse_uw.h buf_save.h c3.h c3_main.h c_types.h call.h ceiling.h cfn.h character.h compare.h config.h env.h error.h error_handler.h eval.h f32.h f64.h fact.h facts.h facts_cursor.h facts_spec.h facts_spec_cursor.h facts_with.h facts_with_cursor.h file.h float.h fn.h fn_clause.h frame.h hash.h ident.h integer.h io.h list.h log.h map.h module.h operator.h ptag.h quote.h s16.h s32.h s64.h s8.h sequence.h set__fact.h set__tag.h set_cursor__fact.h set_cursor__tag.h set_item__fact.h set_item__tag.h sha1.h sign.h skiplist__fact.h skiplist_node__fact.h str.h sw.h sym.h tag.h time.h timespec.h tuple.h type.h types.h u16.h u32.h u64.h u8.h ucd.h uw.h var.h '
+SOURCES='abs.c arg.c array.c binding.c bool.c buf.c buf_file.c buf_inspect.c buf_inspect_s16.c buf_inspect_s16_binary.c buf_inspect_s16_decimal.c buf_inspect_s16_hexadecimal.c buf_inspect_s16_octal.c buf_inspect_s32.c buf_inspect_s32_binary.c buf_inspect_s32_decimal.c buf_inspect_s32_hexadecimal.c buf_inspect_s32_octal.c buf_inspect_s64.c buf_inspect_s64_binary.c buf_inspect_s64_decimal.c buf_inspect_s64_hexadecimal.c buf_inspect_s64_octal.c buf_inspect_s8.c buf_inspect_s8_binary.c buf_inspect_s8_decimal.c buf_inspect_s8_hexadecimal.c buf_inspect_s8_octal.c buf_inspect_sw.c buf_inspect_sw_binary.c buf_inspect_sw_decimal.c buf_inspect_sw_hexadecimal.c buf_inspect_sw_octal.c buf_inspect_u16.c buf_inspect_u16_binary.c buf_inspect_u16_decimal.c buf_inspect_u16_hexadecimal.c buf_inspect_u16_octal.c buf_inspect_u32.c buf_inspect_u32_binary.c buf_inspect_u32_decimal.c buf_inspect_u32_hexadecimal.c buf_inspect_u32_octal.c buf_inspect_u64.c buf_inspect_u64_binary.c buf_inspect_u64_decimal.c buf_inspect_u64_hexadecimal.c buf_inspect_u64_octal.c buf_inspect_u8.c buf_inspect_u8_binary.c buf_inspect_u8_decimal.c buf_inspect_u8_hexadecimal.c buf_inspect_u8_octal.c buf_inspect_uw.c buf_inspect_uw_binary.c buf_inspect_uw_decimal.c buf_inspect_uw_hexadecimal.c buf_inspect_uw_octal.c buf_parse.c buf_parse_c.c buf_parse_s16.c buf_parse_s32.c buf_parse_s64.c buf_parse_s8.c buf_parse_sw.c buf_parse_u16.c buf_parse_u32.c buf_parse_u64.c buf_parse_u8.c buf_parse_uw.c buf_save.c c3.c call.c ceiling.c cfn.c character.c compare.c env.c error.c error_handler.c eval.c f32.c f64.c fact.c facts.c facts_cursor.c facts_spec.c facts_spec_cursor.c facts_with.c facts_with_cursor.c file.c fn.c fn_clause.c frame.c hash.c ident.c integer.c io.c license.c list.c log.c map.c module.c operator.c ptag.c quote.c s16.c s32.c s64.c s8.c sequence.c set__fact.c set__tag.c set_cursor__fact.c set_cursor__tag.c set_item__fact.c set_item__tag.c sign.c skiplist__fact.c skiplist_node__fact.c str.c sw.c sym.c tag.c time.c timespec.c tuple.c type.c u16.c u32.c u64.c u8.c ucd.c uw.c var.c '
+LO_SOURCES='abs.c arg.c array.c binding.c bool.c buf.c buf_file.c buf_inspect.c buf_inspect_s16.c buf_inspect_s16_binary.c buf_inspect_s16_decimal.c buf_inspect_s16_hexadecimal.c buf_inspect_s16_octal.c buf_inspect_s32.c buf_inspect_s32_binary.c buf_inspect_s32_decimal.c buf_inspect_s32_hexadecimal.c buf_inspect_s32_octal.c buf_inspect_s64.c buf_inspect_s64_binary.c buf_inspect_s64_decimal.c buf_inspect_s64_hexadecimal.c buf_inspect_s64_octal.c buf_inspect_s8.c buf_inspect_s8_binary.c buf_inspect_s8_decimal.c buf_inspect_s8_hexadecimal.c buf_inspect_s8_octal.c buf_inspect_sw.c buf_inspect_sw_binary.c buf_inspect_sw_decimal.c buf_inspect_sw_hexadecimal.c buf_inspect_sw_octal.c buf_inspect_u16.c buf_inspect_u16_binary.c buf_inspect_u16_decimal.c buf_inspect_u16_hexadecimal.c buf_inspect_u16_octal.c buf_inspect_u32.c buf_inspect_u32_binary.c buf_inspect_u32_decimal.c buf_inspect_u32_hexadecimal.c buf_inspect_u32_octal.c buf_inspect_u64.c buf_inspect_u64_binary.c buf_inspect_u64_decimal.c buf_inspect_u64_hexadecimal.c buf_inspect_u64_octal.c buf_inspect_u8.c buf_inspect_u8_binary.c buf_inspect_u8_decimal.c buf_inspect_u8_hexadecimal.c buf_inspect_u8_octal.c buf_inspect_uw.c buf_inspect_uw_binary.c buf_inspect_uw_decimal.c buf_inspect_uw_hexadecimal.c buf_inspect_uw_octal.c buf_parse.c buf_parse_c.c buf_parse_s16.c buf_parse_s32.c buf_parse_s64.c buf_parse_s8.c buf_parse_sw.c buf_parse_u16.c buf_parse_u32.c buf_parse_u64.c buf_parse_u8.c buf_parse_uw.c buf_save.c c3.c call.c ceiling.c cfn.c character.c compare.c env.c error.c error_handler.c eval.c f32.c f64.c fact.c facts.c facts_cursor.c facts_spec.c facts_spec_cursor.c facts_with.c facts_with_cursor.c file.c fn.c fn_clause.c frame.c hash.c ident.c integer.c io.c license.c list.c log.c map.c module.c operator.c ptag.c quote.c s16.c s32.c s64.c s8.c sequence.c set__fact.c set__tag.c set_cursor__fact.c set_cursor__tag.c set_item__fact.c set_item__tag.c sign.c skiplist__fact.c skiplist_node__fact.c str.c sw.c sym.c tag.c time.c timespec.c tuple.c type.c u16.c u32.c u64.c u8.c ucd.c uw.c var.c ../libtommath/bn_cutoffs.c ../libtommath/bn_mp_2expt.c ../libtommath/bn_mp_abs.c ../libtommath/bn_mp_add.c ../libtommath/bn_mp_add_d.c ../libtommath/bn_mp_and.c ../libtommath/bn_mp_clamp.c ../libtommath/bn_mp_clear.c ../libtommath/bn_mp_clear_multi.c ../libtommath/bn_mp_cmp.c ../libtommath/bn_mp_cmp_d.c ../libtommath/bn_mp_cmp_mag.c ../libtommath/bn_mp_cnt_lsb.c ../libtommath/bn_mp_complement.c ../libtommath/bn_mp_copy.c ../libtommath/bn_mp_count_bits.c ../libtommath/bn_mp_div.c ../libtommath/bn_mp_div_2.c ../libtommath/bn_mp_div_2d.c ../libtommath/bn_mp_div_3.c ../libtommath/bn_mp_div_d.c ../libtommath/bn_mp_dr_is_modulus.c ../libtommath/bn_mp_dr_reduce.c ../libtommath/bn_mp_dr_setup.c ../libtommath/bn_mp_error_to_string.c ../libtommath/bn_mp_exch.c ../libtommath/bn_mp_exptmod.c ../libtommath/bn_mp_gcd.c ../libtommath/bn_mp_get_double.c ../libtommath/bn_mp_get_i32.c ../libtommath/bn_mp_get_i64.c ../libtommath/bn_mp_get_mag_u32.c ../libtommath/bn_mp_get_mag_u64.c ../libtommath/bn_mp_grow.c ../libtommath/bn_mp_init.c ../libtommath/bn_mp_init_copy.c ../libtommath/bn_mp_init_multi.c ../libtommath/bn_mp_init_size.c ../libtommath/bn_mp_invmod.c ../libtommath/bn_mp_lcm.c ../libtommath/bn_mp_lshd.c ../libtommath/bn_mp_mod.c ../libtommath/bn_mp_mod_2d.c ../libtommath/bn_mp_montgomery_calc_normalization.c ../libtommath/bn_mp_montgomery_reduce.c ../libtommath/bn_mp_montgomery_setup.c ../libtommath/bn_mp_mul.c ../libtommath/bn_mp_mul_2.c ../libtommath/bn_mp_mul_2d.c ../libtommath/bn_mp_mul_d.c ../libtommath/bn_mp_mulmod.c ../libtommath/bn_mp_neg.c ../libtommath/bn_mp_or.c ../libtommath/bn_mp_radix_size.c ../libtommath/bn_mp_reduce.c ../libtommath/bn_mp_reduce_2k.c ../libtommath/bn_mp_reduce_2k_l.c ../libtommath/bn_mp_reduce_2k_setup.c ../libtommath/bn_mp_reduce_2k_setup_l.c ../libtommath/bn_mp_reduce_is_2k.c ../libtommath/bn_mp_reduce_is_2k_l.c ../libtommath/bn_mp_reduce_setup.c ../libtommath/bn_mp_rshd.c ../libtommath/bn_mp_set.c ../libtommath/bn_mp_set_double.c ../libtommath/bn_mp_set_i32.c ../libtommath/bn_mp_set_i64.c ../libtommath/bn_mp_set_l.c ../libtommath/bn_mp_set_u32.c ../libtommath/bn_mp_set_u64.c ../libtommath/bn_mp_set_ul.c ../libtommath/bn_mp_sqr.c ../libtommath/bn_mp_sqrt.c ../libtommath/bn_mp_sub.c ../libtommath/bn_mp_sub_d.c ../libtommath/bn_mp_xor.c ../libtommath/bn_mp_zero.c ../libtommath/bn_s_mp_add.c ../libtommath/bn_s_mp_balance_mul.c ../libtommath/bn_s_mp_exptmod.c ../libtommath/bn_s_mp_exptmod_fast.c ../libtommath/bn_s_mp_invmod_fast.c ../libtommath/bn_s_mp_invmod_slow.c ../libtommath/bn_s_mp_karatsuba_mul.c ../libtommath/bn_s_mp_karatsuba_sqr.c ../libtommath/bn_s_mp_montgomery_reduce_fast.c ../libtommath/bn_s_mp_mul_digs.c ../libtommath/bn_s_mp_mul_digs_fast.c ../libtommath/bn_s_mp_mul_high_digs.c ../libtommath/bn_s_mp_mul_high_digs_fast.c ../libtommath/bn_s_mp_rand_platform.c ../libtommath/bn_s_mp_sqr.c ../libtommath/bn_s_mp_sqr_fast.c ../libtommath/bn_s_mp_sub.c ../libtommath/bn_s_mp_toom_mul.c ../libtommath/bn_s_mp_toom_sqr.c '
diff --git a/libc3/sw.c b/libc3/sw.c
index 706ca01..bfedad4 100644
--- a/libc3/sw.c
+++ b/libc3/sw.c
@@ -79,6 +79,7 @@ sw * sw_cast (s_tag *tag, sw *dest)
*dest = (sw) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/tag.c b/libc3/tag.c
index 6a37253..303cf5a 100644
--- a/libc3/tag.c
+++ b/libc3/tag.c
@@ -30,6 +30,7 @@
#include "ident.h"
#include "integer.h"
#include "list.h"
+#include "map.h"
#include "quote.h"
#include "str.h"
#include "tag.h"
@@ -1268,134 +1269,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
{
s_integer tmp;
s_integer tmp2;
- s_tag tmp_a;
assert(a);
assert(b);
assert(result);
switch (a->type) {
- case TAG_BOOL:
- tmp_a.data.bool = a->data.bool ? 1 : 0;
- switch (b->type) {
- case TAG_BOOL:
- return tag_init_bool(result, tmp_a.data.bool &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_bool(result, tmp_a.data.bool & b->data.character);
- case TAG_INTEGER:
- integer_init_u8(&tmp, tmp_a.data.bool);
- integer_band(&tmp, &b->data.integer, &tmp2);
- tag_init_bool(result, integer_to_u8(&tmp2));
- integer_clean(&tmp);
- integer_clean(&tmp2);
- return result;
- case TAG_SW:
- return tag_init_bool(result, tmp_a.data.bool & b->data.sw);
- case TAG_S64:
- return tag_init_bool(result, tmp_a.data.bool & b->data.s64);
- case TAG_S32:
- return tag_init_bool(result, tmp_a.data.bool & b->data.s32);
- case TAG_S16:
- return tag_init_bool(result, tmp_a.data.bool & b->data.s16);
- case TAG_S8:
- return tag_init_bool(result, tmp_a.data.bool & b->data.s8);
- case TAG_U8:
- return tag_init_bool(result, tmp_a.data.bool & b->data.u8);
- case TAG_U16:
- return tag_init_bool(result, tmp_a.data.bool & b->data.u16);
- case TAG_U32:
- return tag_init_bool(result, tmp_a.data.bool & b->data.u32);
- case TAG_U64:
- return tag_init_bool(result, tmp_a.data.bool & b->data.u64);
- case TAG_UW:
- return tag_init_bool(result, tmp_a.data.bool & b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- goto error;
- }
- goto error;
- case TAG_CHARACTER:
- switch (b->type) {
- case TAG_BOOL:
- return tag_init_character(result, a->data.character &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_character(result, a->data.character & b->data.character);
- case TAG_INTEGER:
- integer_init_u32(&tmp, a->data.character);
- integer_band(&tmp, &b->data.integer, &tmp2);
- tag_init_character(result, integer_to_u32(&tmp2));
- integer_clean(&tmp);
- integer_clean(&tmp2);
- return result;
- case TAG_SW:
- return tag_init_character(result, a->data.character & b->data.sw);
- case TAG_S64:
- return tag_init_character(result, a->data.character & b->data.s64);
- case TAG_S32:
- return tag_init_character(result, a->data.character & b->data.s32);
- case TAG_S16:
- return tag_init_character(result, a->data.character & b->data.s16);
- case TAG_S8:
- return tag_init_character(result, a->data.character & b->data.s8);
- case TAG_U8:
- return tag_init_character(result, a->data.character & b->data.u8);
- case TAG_U16:
- return tag_init_character(result, a->data.character & b->data.u16);
- case TAG_U32:
- return tag_init_character(result, a->data.character & b->data.u32);
- case TAG_U64:
- return tag_init_character(result, a->data.character & b->data.u64);
- case TAG_UW:
- return tag_init_character(result, a->data.character & b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- goto error;
- }
- goto error;
case TAG_INTEGER:
switch (b->type) {
- case TAG_BOOL:
- integer_init_u8(&tmp, b->data.bool ? 1 : 0);
- result->type = TAG_INTEGER;
- integer_band(&a->data.integer, &tmp, &result->data.integer);
- integer_clean(&tmp);
- return result;
- case TAG_CHARACTER:
- integer_init_u32(&tmp, b->data.character);
- result->type = TAG_INTEGER;
- integer_band(&a->data.integer, &tmp, &result->data.integer);
- integer_clean(&tmp);
- return result;
case TAG_INTEGER:
result->type = TAG_INTEGER;
integer_band(&a->data.integer, &b->data.integer,
@@ -1461,33 +1340,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
integer_band(&a->data.integer, &tmp, &result->data.integer);
integer_clean(&tmp);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_SW:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_sw(result, a->data.sw &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_sw(result, a->data.sw & b->data.character);
case TAG_INTEGER:
integer_init_sw(&tmp, a->data.sw);
integer_band(&tmp, &b->data.integer, &tmp2);
@@ -1515,33 +1373,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_sw(result, a->data.sw & b->data.u64);
case TAG_UW:
return tag_init_sw(result, a->data.sw & b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_S64:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_s64(result, a->data.s64 &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_s64(result, a->data.s64 & b->data.character);
case TAG_INTEGER:
integer_init_s64(&tmp, a->data.s64);
result->type = TAG_INTEGER;
@@ -1580,33 +1417,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_S32:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_s32(result, a->data.s32 &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_s32(result, a->data.s32 & b->data.character);
case TAG_INTEGER:
integer_init_s32(&tmp, a->data.s32);
result->type = TAG_INTEGER;
@@ -1645,33 +1461,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_S16:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_s16(result, a->data.s16 &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_s16(result, a->data.s16 & b->data.character);
case TAG_INTEGER:
integer_init_s16(&tmp, a->data.s16);
result->type = TAG_INTEGER;
@@ -1710,33 +1505,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_S8:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_s8(result, a->data.s8 &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_s8(result, a->data.s8 & b->data.character);
case TAG_INTEGER:
integer_init_s8(&tmp, a->data.s8);
result->type = TAG_INTEGER;
@@ -1775,33 +1549,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_U8:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_u8(result, a->data.u8 &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_u8(result, a->data.u8 & b->data.character);
case TAG_INTEGER:
integer_init_u8(&tmp, a->data.u8);
integer_band(&tmp, &b->data.integer, &tmp2);
@@ -1829,33 +1582,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u8(result, a->data.u8 & b->data.u64);
case TAG_UW:
return tag_init_u8(result, a->data.u8 & b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_U16:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_u16(result, a->data.u16 &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_u16(result, a->data.u16 & b->data.character);
case TAG_INTEGER:
integer_init_u16(&tmp, a->data.u16);
integer_band(&tmp, &b->data.integer, &tmp2);
@@ -1883,33 +1615,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u16(result, a->data.u16 & b->data.u64);
case TAG_UW:
return tag_init_u16(result, a->data.u16 & b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_U32:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_u32(result, a->data.u32 &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_u32(result, a->data.u32 & b->data.character);
case TAG_INTEGER:
integer_init_u32(&tmp, a->data.u32);
integer_band(&tmp, &b->data.integer, &tmp2);
@@ -1937,33 +1648,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u32(result, a->data.u32 & b->data.u64);
case TAG_UW:
return tag_init_u32(result, a->data.u32 & b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_U64:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_u64(result, a->data.u64 &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_u64(result, a->data.u64 & b->data.character);
case TAG_INTEGER:
integer_init_u64(&tmp, a->data.u64);
integer_band(&tmp, &b->data.integer, &tmp2);
@@ -1991,33 +1681,12 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, a->data.u64 & b->data.u64);
case TAG_UW:
return tag_init_u64(result, a->data.u64 & b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
case TAG_UW:
switch (b->type) {
- case TAG_BOOL:
- return tag_init_uw(result, a->data.uw &
- (b->data.bool ? 1 : 0));
- case TAG_CHARACTER:
- return tag_init_uw(result, a->data.uw & b->data.character);
case TAG_INTEGER:
integer_init_uw(&tmp, a->data.uw);
integer_band(&tmp, &b->data.integer, &tmp2);
@@ -2045,43 +1714,11 @@ s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_uw(result, a->data.uw & b->data.u64);
case TAG_UW:
return tag_init_uw(result, a->data.uw & b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
error:
@@ -2120,25 +1757,7 @@ s_tag * tag_bnot (const s_tag *tag, s_tag *result)
return tag_init_u64(result, ~tag->data.u64);
case TAG_UW:
return tag_init_uw(result, ~tag->data.uw);
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
warnx("tag_bnot: invalid tag type: %s",
tag_type_to_string(tag->type));
}
@@ -2227,25 +1846,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
integer_bor(&a->data.integer, &tmp, &result->data.integer);
integer_clean(&tmp);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -2289,25 +1890,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -2351,25 +1934,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -2413,25 +1978,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -2475,25 +2022,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -2537,25 +2066,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -2592,23 +2103,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, (u64) a->data.u8 | b->data.u64);
case TAG_UW:
return tag_init_uw(result, (uw) a->data.u8 | b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -2645,23 +2140,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, (u64) a->data.u16 | b->data.u64);
case TAG_UW:
return tag_init_uw(result, (uw) a->data.u16 | b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -2698,23 +2177,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, (u64) a->data.u32 | b->data.u64);
case TAG_UW:
return tag_init_uw(result, (uw) a->data.u32 | b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -2811,23 +2274,7 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -2865,45 +2312,11 @@ s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_uw(result, a->data.uw | b->data.u64);
case TAG_UW:
return tag_init_uw(result, a->data.uw | b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
error:
@@ -2988,25 +2401,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
integer_bxor(&a->data.integer, &tmp, &result->data.integer);
integer_clean(&tmp);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -3050,25 +2445,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -3112,25 +2489,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -3174,25 +2533,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -3236,25 +2577,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -3298,25 +2621,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
goto error;
@@ -3353,23 +2658,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, (u64) a->data.u8 ^ b->data.u64);
case TAG_UW:
return tag_init_uw(result, (uw) a->data.u8 ^ b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -3406,23 +2695,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, (u64) a->data.u16 ^ b->data.u64);
case TAG_UW:
return tag_init_uw(result, (uw) a->data.u16 ^ b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -3459,23 +2732,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, (u64) a->data.u32 ^ b->data.u64);
case TAG_UW:
return tag_init_uw(result, (uw) a->data.u32 ^ b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -3572,23 +2829,7 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
integer_clean(&tmp);
integer_clean(&tmp2);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -3626,45 +2867,11 @@ s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_uw(result, a->data.uw ^ b->data.u64);
case TAG_UW:
return tag_init_uw(result, a->data.uw ^ b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
- case TAG_ARRAY:
- case TAG_BOOL:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_CHARACTER:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
- case TAG_VOID:
+ default:
goto error;
}
error:
@@ -3763,6 +2970,7 @@ void tag_clean (s_tag *tag)
case TAG_FN: fn_clean(&tag->data.fn); break;
case TAG_INTEGER: integer_clean(&tag->data.integer); break;
case TAG_LIST: list_delete_all(tag->data.list); break;
+ case TAG_MAP: map_clean(&tag->data.map); break;
case TAG_QUOTE: quote_clean(&tag->data.quote); break;
case TAG_STR: str_clean(&tag->data.str); break;
case TAG_TUPLE: tuple_clean(&tag->data.tuple); break;
@@ -3840,6 +3048,9 @@ s_tag * tag_copy (const s_tag *src, s_tag *dest)
case TAG_LIST:
list_copy((const s_list **) &src->data.list, &dest->data.list);
break;
+ case TAG_MAP:
+ map_copy(&src->data.map, &dest->data.map);
+ break;
case TAG_QUOTE:
quote_copy(&src->data.quote, &dest->data.quote);
break;
@@ -6268,23 +5479,7 @@ s_tag * tag_neg (const s_tag *tag, s_tag *result)
integer_neg(&tmp, &result->data.integer);
integer_clean(&tmp);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
warnx("tag_neg: invalid tag type: %s",
tag_type_to_string(tag->type));
}
@@ -6435,23 +5630,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_bool(result, tmp_a.data.bool << b->data.u64);
case TAG_UW:
return tag_init_bool(result, tmp_a.data.bool << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6489,23 +5668,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_character(result, a->data.character << b->data.u64);
case TAG_UW:
return tag_init_character(result, a->data.character << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6567,23 +5730,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
result->type = TAG_INTEGER;
integer_lshift(&a->data.integer, b->data.uw, &result->data.integer);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6621,23 +5768,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_sw(result, a->data.sw << b->data.u64);
case TAG_UW:
return tag_init_sw(result, a->data.sw << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6675,23 +5806,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_s64(result, a->data.s64 << b->data.u64);
case TAG_UW:
return tag_init_s64(result, a->data.s64 << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6729,23 +5844,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_s32(result, a->data.s32 << b->data.u64);
case TAG_UW:
return tag_init_s32(result, a->data.s32 << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6783,23 +5882,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_s16(result, a->data.s16 << b->data.u64);
case TAG_UW:
return tag_init_s16(result, a->data.s16 << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6837,23 +5920,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_s8(result, a->data.s8 << b->data.u64);
case TAG_UW:
return tag_init_s8(result, a->data.s8 << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6891,23 +5958,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u8(result, a->data.u8 << b->data.u64);
case TAG_UW:
return tag_init_u8(result, a->data.u8 << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6945,23 +5996,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u16(result, a->data.u16 << b->data.u64);
case TAG_UW:
return tag_init_u16(result, a->data.u16 << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -6999,23 +6034,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u32(result, a->data.u32 << b->data.u64);
case TAG_UW:
return tag_init_u32(result, a->data.u32 << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7053,23 +6072,7 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, a->data.u64 << b->data.u64);
case TAG_UW:
return tag_init_u64(result, a->data.u64 << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7107,43 +6110,11 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_uw(result, a->data.uw << b->data.u64);
case TAG_UW:
return tag_init_uw(result, a->data.uw << b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
error:
@@ -7194,23 +6165,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_bool(result, tmp_a.data.bool >> b->data.u64);
case TAG_UW:
return tag_init_bool(result, tmp_a.data.bool >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7248,23 +6203,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_character(result, a->data.character >> b->data.u64);
case TAG_UW:
return tag_init_character(result, a->data.character >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7326,23 +6265,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
result->type = TAG_INTEGER;
integer_lshift(&a->data.integer, -b->data.uw, &result->data.integer);
return result;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7380,23 +6303,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_sw(result, a->data.sw >> b->data.u64);
case TAG_UW:
return tag_init_sw(result, a->data.sw >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7434,23 +6341,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_s64(result, a->data.s64 >> b->data.u64);
case TAG_UW:
return tag_init_s64(result, a->data.s64 >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7488,23 +6379,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_s32(result, a->data.s32 >> b->data.u64);
case TAG_UW:
return tag_init_s32(result, a->data.s32 >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7542,23 +6417,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_s16(result, a->data.s16 >> b->data.u64);
case TAG_UW:
return tag_init_s16(result, a->data.s16 >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7596,23 +6455,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_s8(result, a->data.s8 >> b->data.u64);
case TAG_UW:
return tag_init_s8(result, a->data.s8 >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7650,23 +6493,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u8(result, a->data.u8 >> b->data.u64);
case TAG_UW:
return tag_init_u8(result, a->data.u8 >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7704,23 +6531,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u16(result, a->data.u16 >> b->data.u64);
case TAG_UW:
return tag_init_u16(result, a->data.u16 >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7758,23 +6569,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u32(result, a->data.u32 >> b->data.u64);
case TAG_UW:
return tag_init_u32(result, a->data.u32 >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7812,23 +6607,7 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_u64(result, a->data.u64 >> b->data.u64);
case TAG_UW:
return tag_init_u64(result, a->data.u64 >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
@@ -7866,43 +6645,11 @@ s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
return tag_init_uw(result, a->data.uw >> b->data.u64);
case TAG_UW:
return tag_init_uw(result, a->data.uw >> b->data.uw);
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
goto error;
- case TAG_VOID:
- case TAG_ARRAY:
- case TAG_CALL:
- case TAG_CFN:
- case TAG_F32:
- case TAG_F64:
- case TAG_FACT:
- case TAG_FN:
- case TAG_IDENT:
- case TAG_LIST:
- case TAG_PTAG:
- case TAG_PTR:
- case TAG_QUOTE:
- case TAG_STR:
- case TAG_SYM:
- case TAG_TUPLE:
- case TAG_VAR:
+ default:
goto error;
}
error:
@@ -8621,6 +7368,11 @@ void * tag_to_ffi_pointer (s_tag *tag, const s_sym *type)
type == sym_1("list"))
return &tag->data.list;
goto invalid_type;
+ case TAG_MAP:
+ if (type == sym_1("Map") ||
+ type == sym_1("map"))
+ return &tag->data.map;
+ goto invalid_type;
case TAG_PTAG:
if (type == sym_1("Ptag") ||
type == sym_1("ptag"))
@@ -8730,6 +7482,8 @@ void * tag_to_pointer (s_tag *tag, const s_sym *type)
return &tag->data.uw;
case TAG_LIST:
return &tag->data.list;
+ case TAG_MAP:
+ return &tag->data.map;
case TAG_PTAG:
return &tag->data.ptag;
case TAG_PTR:
@@ -8815,6 +7569,8 @@ sw tag_type_size (e_tag_type type)
return sizeof(uw);
case TAG_LIST:
return sizeof(s_list *);
+ case TAG_MAP:
+ return sizeof(s_map);
case TAG_PTAG:
return sizeof(p_tag);
case TAG_PTR:
@@ -8883,6 +7639,8 @@ f_buf_inspect tag_type_to_buf_inspect (e_tag_type type)
return (f_buf_inspect) buf_inspect_uw;
case TAG_LIST:
return (f_buf_inspect) buf_inspect_list;
+ case TAG_MAP:
+ return (f_buf_inspect) buf_inspect_map;
case TAG_PTAG:
return (f_buf_inspect) buf_inspect_ptag;
case TAG_PTR:
@@ -8909,6 +7667,7 @@ f_buf_inspect_size tag_type_to_buf_inspect_size (e_tag_type type)
case TAG_VOID:
return (f_buf_inspect_size) buf_inspect_void_size;
case TAG_ARRAY:
+ return (f_buf_inspect_size) buf_inspect_array_size;
case TAG_BOOL:
return (f_buf_inspect_size) buf_inspect_bool_size;
case TAG_CALL:
@@ -8951,6 +7710,8 @@ f_buf_inspect_size tag_type_to_buf_inspect_size (e_tag_type type)
return (f_buf_inspect_size) buf_inspect_uw_size;
case TAG_LIST:
return (f_buf_inspect_size) buf_inspect_list_size;
+ case TAG_MAP:
+ return (f_buf_inspect_size) buf_inspect_map_size;
case TAG_PTAG:
return (f_buf_inspect_size) buf_inspect_ptag_size;
case TAG_PTR:
@@ -9020,6 +7781,8 @@ f_buf_parse tag_type_to_buf_parse (e_tag_type type)
return (f_buf_parse) buf_parse_uw;
case TAG_LIST:
return (f_buf_parse) buf_parse_list;
+ case TAG_MAP:
+ return (f_buf_parse) buf_parse_map;
case TAG_PTAG:
return (f_buf_parse) buf_parse_ptag;
case TAG_PTR:
@@ -9067,6 +7830,8 @@ ffi_type * tag_type_to_ffi_type (e_tag_type type)
return &ffi_type_sint;
case TAG_LIST:
return &ffi_type_pointer;
+ case TAG_MAP:
+ return &ffi_type_pointer;
case TAG_PTAG:
return &ffi_type_pointer;
case TAG_PTR:
@@ -9135,6 +7900,7 @@ const s_sym * tag_type_to_module (e_tag_type tag_type)
case TAG_U64: return sym_1("U64");
case TAG_UW: return sym_1("Uw");
case TAG_LIST: return sym_1("List");
+ case TAG_MAP: return sym_1("Map");
case TAG_PTAG: return sym_1("Ptag");
case TAG_PTR: return sym_1("Ptr");
case TAG_QUOTE: return sym_1("Quote");
@@ -9174,6 +7940,7 @@ s8 * tag_type_to_string (e_tag_type type)
case TAG_U64: return "U64";
case TAG_UW: return "Uw";
case TAG_LIST: return "List";
+ case TAG_MAP: return "Map";
case TAG_PTAG: return "Ptag";
case TAG_PTR: return "Void*";
case TAG_QUOTE: return "Quote";
@@ -9213,6 +7980,7 @@ const s_sym * tag_type_to_sym (e_tag_type tag_type)
case TAG_U64: return sym_1("U64");
case TAG_UW: return sym_1("Uw");
case TAG_LIST: return sym_1("List");
+ case TAG_MAP: return sym_1("Map");
case TAG_PTAG: return sym_1("Ptag");
case TAG_PTR: return sym_1("Void*");
case TAG_QUOTE: return sym_1("Quote");
diff --git a/libc3/types.h b/libc3/types.h
index f777a15..2e69015 100644
--- a/libc3/types.h
+++ b/libc3/types.h
@@ -104,6 +104,7 @@ typedef enum {
TAG_U64,
TAG_UW,
TAG_LIST,
+ TAG_MAP,
TAG_PTAG,
TAG_PTR,
TAG_QUOTE,
@@ -142,6 +143,7 @@ typedef struct integer_fraction s_integer_fraction;
typedef struct list s_list;
typedef struct list s_list_map;
typedef struct log s_log;
+typedef struct map s_map;
typedef struct ptr s_ptr;
typedef struct quote s_quote;
typedef struct sequence s_sequence;
@@ -217,6 +219,17 @@ struct frame {
s_frame *next;
};
+/* TODO: perfect hashing of keys with cookie */
+struct map {
+ uw count;
+ s_tag *keys; /* sorted (see tag_compare) */
+ s_tag *values;
+ /*
+ uw *key_hash_table;
+ uw key_hash_cookie;
+ */
+};
+
struct ptr {
const s_sym *type;
void *p;
@@ -391,6 +404,7 @@ union tag_data {
s_ident ident;
s_integer integer;
s_list *list;
+ s_map map;
p_tag ptag;
s_ptr ptr;
s_quote quote;
diff --git a/libc3/u.c.in b/libc3/u.c.in
index 8b2fec3..628d87e 100644
--- a/libc3/u.c.in
+++ b/libc3/u.c.in
@@ -79,6 +79,7 @@ u_bits$ * u_bits$_cast (s_tag *tag, u_bits$ *dest)
*dest = (u_bits$) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/u16.c b/libc3/u16.c
index 6cb15e2..4c5e8a3 100644
--- a/libc3/u16.c
+++ b/libc3/u16.c
@@ -79,6 +79,7 @@ u16 * u16_cast (s_tag *tag, u16 *dest)
*dest = (u16) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/u32.c b/libc3/u32.c
index 4e84a8f..4b2cd8a 100644
--- a/libc3/u32.c
+++ b/libc3/u32.c
@@ -79,6 +79,7 @@ u32 * u32_cast (s_tag *tag, u32 *dest)
*dest = (u32) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/u64.c b/libc3/u64.c
index 1a92170..f4fbb8a 100644
--- a/libc3/u64.c
+++ b/libc3/u64.c
@@ -79,6 +79,7 @@ u64 * u64_cast (s_tag *tag, u64 *dest)
*dest = (u64) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/u8.c b/libc3/u8.c
index 32424e2..032f337 100644
--- a/libc3/u8.c
+++ b/libc3/u8.c
@@ -79,6 +79,7 @@ u8 * u8_cast (s_tag *tag, u8 *dest)
*dest = (u8) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/uw.c b/libc3/uw.c
index ae2da6f..4da7755 100644
--- a/libc3/uw.c
+++ b/libc3/uw.c
@@ -79,6 +79,7 @@ uw * uw_cast (s_tag *tag, uw *dest)
*dest = (uw) tag->data.uw;
return dest;
case TAG_LIST:
+ case TAG_MAP:
case TAG_PTAG:
case TAG_PTR:
case TAG_QUOTE:
diff --git a/libc3/window/cairo/xcb/configure b/libc3/window/cairo/xcb/configure
index dbd8f6f..7145d99 100755
--- a/libc3/window/cairo/xcb/configure
+++ b/libc3/window/cairo/xcb/configure
@@ -34,7 +34,7 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
CPPFLAGS="${CPPFLAGS:=}"
ENV_CFLAGS="${CFLAGS:=}"
DEFAULT_CFLAGS="-O2 -pipe"
-LDFLAGS="--shared -no-undefined ${LDFLAGS}"
+LDFLAGS="--shared --no-undefined ${LDFLAGS}"
LIBS="${LIBS} -rpath ${PREFIX}/lib"
# Common config for all targets
diff --git a/sources.mk b/sources.mk
index 5a3eaea..ae803a9 100644
--- a/sources.mk
+++ b/sources.mk
@@ -5,12 +5,12 @@ C3_CONFIGURES = \
c3s/update_sources \
ic3/configure \
ic3/update_sources \
- libc3/update_sources \
libc3/configure \
+ libc3/update_sources \
libc3/window/cairo/xcb/configure \
- libc3/window/cairo/xcb/demo/configure \
- libc3/window/cairo/xcb/demo/update_sources \
libc3/window/cairo/xcb/update_sources \
+ libc3/window/cairo/xcb/demo/update_sources \
+ libc3/window/cairo/xcb/demo/configure \
libc3/window/configure \
libtommath/configure \
libtommath/update_sources \
@@ -36,365 +36,367 @@ C3_C_SOURCES = \
c3s/buf_readline.c \
c3s/c3s.c \
c3s/buf_readline.h \
- ic3/buf_linenoise.c \
ic3/ic3.c \
+ ic3/buf_linenoise.c \
ic3/buf_linenoise.h \
ic3/linenoise.c \
- libc3/buf_inspect_s8_decimal.h \
- libc3/fn.h \
- libc3/buf_inspect_s8_hexadecimal.c \
- libc3/sym.c \
- libc3/buf_inspect_s8_hexadecimal.h \
- libc3/buf_inspect_s16.c \
- libc3/buf_inspect_s16.h \
- libc3/buf_inspect_s16_binary.c \
- libc3/buf_inspect_s16_binary.h \
- libc3/buf_inspect_s16_octal.c \
- libc3/buf_inspect_s16_octal.h \
- libc3/buf_inspect_s16_decimal.c \
- libc3/buf_inspect_s16_decimal.h \
- libc3/buf_inspect_s16_hexadecimal.c \
- libc3/s8.c \
+ libc3/abs.c \
+ libc3/abs.h \
+ libc3/buf.c \
+ libc3/buf.h \
+ libc3/set__tag.c \
+ libc3/set_item__tag.c \
+ libc3/set__tag.h \
+ libc3/set_item__tag.h \
+ libc3/set_cursor__tag.c \
+ libc3/set_cursor__tag.h \
+ libc3/skiplist_node__fact.c \
+ libc3/skiplist_node__fact.h \
+ libc3/skiplist__fact.c \
+ libc3/skiplist__fact.h \
+ libc3/set_item__fact.c \
+ libc3/call.c \
+ libc3/arg.c \
+ libc3/arg.h \
+ libc3/array.c \
+ libc3/array.h \
libc3/binding.c \
+ libc3/c3.c \
+ libc3/set_item__fact.h \
+ libc3/set__fact.c \
+ libc3/set__fact.h \
+ libc3/set_cursor__fact.c \
libc3/binding.h \
- libc3/buf_inspect_s8.c \
- libc3/facts_with_cursor.c \
- libc3/array.h \
- libc3/buf.c \
- libc3/buf_parse.c \
- libc3/integer.h \
- libc3/types.h \
- libc3/type.c \
- libc3/buf_inspect_s8.h \
- libc3/buf_inspect_s8_binary.c \
- libc3/buf_inspect_s8_binary.h \
- libc3/buf_inspect_s8_octal.c \
- libc3/buf_inspect_s8_octal.h \
- libc3/buf_inspect_s8_decimal.c \
- libc3/buf_inspect.c \
+ libc3/set_cursor__fact.h \
+ libc3/uw.h \
+ libc3/uw.c \
+ libc3/sw.h \
+ libc3/sw.c \
+ libc3/buf_parse_uw.h \
+ libc3/buf_parse_uw.c \
+ libc3/buf_parse_sw.h \
+ libc3/buf_parse_sw.c \
+ libc3/buf_inspect_uw_hexadecimal.h \
+ libc3/buf_inspect_uw_hexadecimal.c \
+ libc3/buf_inspect_uw.h \
+ libc3/bool.c \
+ libc3/bool.h \
libc3/buf_file.c \
libc3/buf_file.h \
- libc3/bool.c \
- libc3/buf_inspect_s16_hexadecimal.h \
- libc3/io.h \
- libc3/buf_inspect_s32.c \
- libc3/buf_inspect_s32.h \
- libc3/buf_inspect_s32_binary.c \
- libc3/buf_inspect_s32_binary.h \
- libc3/buf_inspect_s32_octal.c \
- libc3/buf_inspect_s32_octal.h \
- libc3/buf_inspect_s32_decimal.c \
- libc3/buf_inspect_s32_decimal.h \
- libc3/buf_inspect_s32_hexadecimal.c \
- libc3/buf_inspect_s32_hexadecimal.h \
- libc3/buf_inspect_s64.c \
- libc3/buf_inspect_s64.h \
- libc3/buf_inspect_s64_binary.c \
- libc3/io.c \
- libc3/abs.h \
- libc3/fn_clause.c \
- libc3/buf_inspect_s64_binary.h \
- libc3/buf_inspect_s64_octal.c \
- libc3/buf_inspect_s64_octal.h \
- libc3/buf_inspect_s64_decimal.c \
- libc3/buf_inspect_s64_decimal.h \
- libc3/buf_inspect_s64_hexadecimal.c \
- libc3/buf_inspect_s64_hexadecimal.h \
- libc3/buf_inspect_sw.c \
- libc3/buf_inspect_sw.h \
- libc3/buf_inspect_sw_binary.c \
- libc3/set__fact.c \
- libc3/file.c \
- libc3/ceiling.c \
+ libc3/buf_inspect_uw_decimal.h \
+ libc3/buf_inspect_uw_decimal.c \
+ libc3/buf_inspect_uw_octal.h \
+ libc3/buf_inspect_uw_octal.c \
+ libc3/buf_inspect_uw_binary.h \
+ libc3/buf_inspect_uw_binary.c \
+ libc3/buf_inspect_sw_hexadecimal.h \
+ libc3/buf_inspect_uw.c \
+ libc3/buf_inspect_sw_hexadecimal.c \
+ libc3/buf_inspect_sw_decimal.h \
+ libc3/buf_inspect_sw_decimal.c \
+ libc3/buf_inspect_sw_octal.h \
+ libc3/buf_parse.h \
libc3/buf_parse_c.c \
- libc3/buf_parse_c.h \
- libc3/buf_inspect_sw_binary.h \
libc3/buf_save.c \
+ libc3/facts_spec_cursor.c \
libc3/buf_inspect_sw_octal.c \
- libc3/buf_parse.h \
- libc3/compare.c \
- libc3/buf_inspect_sw_octal.h \
- libc3/buf_inspect_sw_decimal.c \
- libc3/buf_inspect_sw_decimal.h \
- libc3/buf_inspect_sw_hexadecimal.c \
- libc3/buf_inspect_sw_hexadecimal.h \
+ libc3/buf_inspect_sw_binary.h \
+ libc3/buf_inspect_sw_binary.c \
+ libc3/buf_inspect_sw.h \
+ libc3/buf_inspect_sw.c \
+ libc3/u64.h \
+ libc3/u64.c \
+ libc3/s64.h \
+ libc3/s64.c \
+ libc3/buf_parse_u64.c \
+ libc3/buf_parse_u64.h \
+ libc3/buf_parse_s64.h \
+ libc3/buf_parse_s64.c \
+ libc3/buf_inspect_u64_hexadecimal.h \
+ libc3/buf_inspect_u64_hexadecimal.c \
+ libc3/buf_inspect_u64.h \
+ libc3/buf_parse_c.h \
+ libc3/buf_save.h \
+ libc3/c3.h \
+ libc3/c_types.h \
libc3/call.h \
- libc3/buf_inspect_u8.c \
- libc3/buf_inspect_u8.h \
- libc3/buf_parse_s8.c \
+ libc3/buf_inspect_u64_decimal.c \
+ libc3/buf_inspect_u64_decimal.h \
+ libc3/buf_inspect_u64_octal.h \
+ libc3/buf_inspect_u64_octal.c \
+ libc3/buf_inspect_u64_binary.h \
+ libc3/buf_inspect_u64_binary.c \
+ libc3/buf_inspect_u64.c \
+ libc3/buf_inspect_s64_hexadecimal.h \
+ libc3/buf_inspect_s64_hexadecimal.c \
+ libc3/buf_inspect_s64_decimal.h \
+ libc3/buf_inspect_s64_decimal.c \
+ libc3/io.c \
+ libc3/ceiling.c \
+ libc3/ceiling.h \
+ libc3/cfn.c \
+ libc3/cfn.h \
libc3/character.c \
- libc3/buf_save.h \
- libc3/fact.h \
- libc3/buf_inspect_u8_binary.c \
- libc3/error.c \
- libc3/buf_inspect_u8_binary.h \
- libc3/buf_inspect_u8_octal.c \
- libc3/buf_inspect_u8_octal.h \
- libc3/buf_inspect_u8_decimal.c \
- libc3/buf_inspect_u8_decimal.h \
- libc3/buf_inspect_u8_hexadecimal.c \
- libc3/buf_inspect_u8_hexadecimal.h \
- libc3/buf_inspect_u16.c \
- libc3/buf_inspect_u16.h \
- libc3/buf_inspect_u16_binary.c \
- libc3/buf_inspect_u16_binary.h \
- libc3/buf_inspect_u16_octal.c \
- libc3/buf_parse_s8.h \
- libc3/error.h \
libc3/character.h \
+ libc3/buf_inspect_s64_octal.h \
+ libc3/buf_inspect_s64_octal.c \
+ libc3/buf_inspect_s64_binary.h \
+ libc3/buf_inspect_s64_binary.c \
+ libc3/buf_inspect_s64.h \
+ libc3/buf_inspect_s64.c \
+ libc3/u32.c \
+ libc3/u32.h \
+ libc3/s32.h \
+ libc3/s32.c \
+ libc3/buf_parse_u32.h \
+ libc3/buf_parse_u32.c \
+ libc3/buf_parse_s32.h \
+ libc3/buf_parse_s32.c \
+ libc3/buf_inspect_u32_hexadecimal.h \
+ libc3/compare.c \
+ libc3/buf_inspect.c \
libc3/compare.h \
- libc3/buf_inspect_u16_octal.h \
- libc3/buf_inspect_u16_decimal.c \
- libc3/tag.h \
- libc3/sign.h \
- libc3/buf.h \
- libc3/buf_inspect_u16_decimal.h \
- libc3/buf_inspect_u16_hexadecimal.c \
- libc3/buf_inspect_u16_hexadecimal.h \
- libc3/buf_inspect_u32.c \
+ libc3/timespec.h \
+ libc3/buf_inspect_u32_hexadecimal.c \
+ libc3/buf_inspect_u32_decimal.h \
+ libc3/buf_inspect_u32_decimal.c \
+ libc3/buf_inspect_u32_octal.h \
+ libc3/buf_inspect_u32_octal.c \
+ libc3/buf_inspect_u32_binary.h \
libc3/buf_inspect_u32.h \
libc3/buf_inspect_u32_binary.c \
- libc3/buf_inspect_u32_binary.h \
- libc3/buf_inspect_u32_octal.c \
- libc3/set__fact.h \
- libc3/buf_inspect_u32_octal.h \
+ libc3/buf_inspect_u32.c \
+ libc3/buf_inspect_s32_hexadecimal.h \
+ libc3/buf_inspect_s32.h \
+ libc3/error.c \
+ libc3/error.h \
libc3/error_handler.c \
- libc3/set_cursor.c.in \
- libc3/set_cursor.h.in \
- libc3/set_item.c.in \
- libc3/set_item.h.in \
- libc3/buf_inspect_u32_decimal.c \
- libc3/buf_inspect_u32_decimal.h \
- libc3/buf_inspect_u32_hexadecimal.c \
- libc3/buf_inspect_u32_hexadecimal.h \
- libc3/buf_inspect_u64.c \
- libc3/buf_inspect_u64.h \
- libc3/buf_inspect_u64_binary.c \
- libc3/buf_inspect_u64_binary.h \
- libc3/buf_inspect_u64_octal.c \
- libc3/buf_inspect_u64_octal.h \
- libc3/s8.h \
libc3/error_handler.h \
- libc3/buf_inspect_u64_decimal.c \
libc3/eval.c \
libc3/eval.h \
- libc3/buf_inspect_u64_decimal.h \
- libc3/fact.c \
- libc3/facts_cursor.c \
- libc3/ceiling.h \
- libc3/buf_inspect_u64_hexadecimal.c \
- libc3/buf_inspect_u64_hexadecimal.h \
- libc3/buf_inspect_uw.c \
- libc3/buf_inspect_uw.h \
- libc3/buf_inspect_uw_binary.c \
- libc3/buf_inspect_uw_binary.h \
- libc3/buf_inspect_uw_octal.c \
- libc3/buf_inspect_uw_octal.h \
- libc3/buf_inspect_uw_decimal.c \
+ libc3/buf_inspect_s32_hexadecimal.c \
+ libc3/buf_inspect_s32_decimal.h \
+ libc3/buf_inspect_s32_decimal.c \
+ libc3/buf_inspect_s32_octal.h \
+ libc3/buf_inspect_s32_octal.c \
+ libc3/buf_inspect_s32_binary.h \
+ libc3/buf_inspect_s32_binary.c \
+ libc3/buf_inspect_s32.c \
+ libc3/u16.h \
+ libc3/u16.c \
+ libc3/s16.h \
+ libc3/s16.c \
+ libc3/buf_parse_u16.h \
+ libc3/buf_parse_u16.c \
+ libc3/fact.c \
+ libc3/fact.h \
+ libc3/facts_cursor.c \
+ libc3/buf_parse_s16.h \
libc3/buf_parse_s16.c \
+ libc3/buf_inspect_u16_hexadecimal.h \
+ libc3/buf_inspect_u16_hexadecimal.c \
+ libc3/buf_inspect_u16_decimal.h \
+ libc3/buf_inspect_u16_decimal.c \
+ libc3/buf_inspect_u16_octal.h \
+ libc3/buf_inspect_u16_octal.c \
+ libc3/buf_inspect_u16_binary.h \
+ libc3/buf_inspect_u16_binary.c \
+ libc3/buf_inspect_u16.h \
+ libc3/buf_inspect_u16.c \
+ libc3/buf_inspect_s16_hexadecimal.h \
+ libc3/list.c \
libc3/facts_cursor.h \
libc3/facts_spec.c \
- libc3/frame.h \
- libc3/sign.c \
- libc3/skiplist.c.in \
- libc3/buf_inspect_uw_decimal.h \
- libc3/buf_inspect_uw_hexadecimal.c \
- libc3/buf_inspect_uw_hexadecimal.h \
- libc3/buf_parse_s16.h \
- libc3/buf_parse_s32.c \
- libc3/buf_parse_s32.h \
- libc3/buf_parse_s64.c \
- libc3/buf_parse_s64.h \
- libc3/buf_parse_sw.c \
- libc3/buf_parse_sw.h \
- libc3/buf_parse_u8.c \
- libc3/buf_parse_u8.h \
- libc3/buf_parse_u16.c \
- libc3/timespec.h \
- libc3/buf_parse_u16.h \
- libc3/buf_parse_u32.c \
- libc3/buf_parse_u32.h \
libc3/facts_spec.h \
- libc3/facts_spec_cursor.c \
- libc3/buf_parse_u64.c \
libc3/facts_spec_cursor.h \
- libc3/buf_parse_u64.h \
- libc3/buf_parse_uw.c \
- libc3/buf_parse_uw.h \
- libc3/set__tag.c \
- libc3/set__tag.h \
- libc3/set_cursor__fact.c \
- libc3/set_cursor__fact.h \
- libc3/set_cursor__tag.c \
- libc3/set_cursor__tag.h \
- libc3/set_item__fact.c \
- libc3/set_item__fact.h \
- libc3/operator.c \
- libc3/set_item__tag.c \
- libc3/s16.c \
- libc3/c3.c \
- libc3/set_item__tag.h \
+ libc3/buf_inspect_s16_hexadecimal.c \
+ libc3/buf_inspect_s16_decimal.h \
+ libc3/buf_inspect_s16_decimal.c \
+ libc3/buf_inspect_s16_octal.h \
+ libc3/buf_inspect_s16_octal.c \
+ libc3/buf_inspect_s16_binary.h \
+ libc3/buf_inspect_s16_binary.c \
+ libc3/buf_inspect_s16.c \
+ libc3/buf_inspect_s16.h \
+ libc3/u8.h \
+ libc3/s8.h \
+ libc3/u8.c \
+ libc3/s8.c \
+ libc3/buf_parse_u8.h \
libc3/facts_with.c \
libc3/facts_with.h \
- libc3/skiplist__fact.c \
- libc3/skiplist__fact.h \
- libc3/buf_parse_u.c.in \
- libc3/fn_clause.h \
- libc3/skiplist_node__fact.c \
- libc3/skiplist_node__fact.h \
- libc3/s16.h \
- libc3/s32.c \
- libc3/s32.h \
- libc3/s64.c \
- libc3/s64.h \
- libc3/sw.c \
- libc3/sw.h \
- libc3/u8.c \
- libc3/u8.h \
- libc3/u16.c \
- libc3/u16.h \
- libc3/u32.c \
- libc3/u32.h \
- libc3/u64.c \
- libc3/module.c \
- libc3/abs.c \
- libc3/u64.h \
- libc3/uw.c \
+ libc3/facts_with_cursor.c \
+ libc3/buf_parse_u8.c \
+ libc3/buf_parse_s8.h \
+ libc3/buf_inspect_u8_hexadecimal.h \
+ libc3/buf_parse_s8.c \
+ libc3/buf_inspect_u8_hexadecimal.c \
+ libc3/buf_inspect_u8_decimal.h \
+ libc3/buf_inspect_u8_decimal.c \
+ libc3/buf_inspect_u8_octal.h \
+ libc3/buf_inspect_u8_octal.c \
+ libc3/buf_inspect_u8_binary.h \
+ libc3/buf_inspect_u8_binary.c \
+ libc3/buf_inspect_u8.h \
+ libc3/buf_inspect_u8.c \
+ libc3/buf_inspect_s8.h \
libc3/facts_with_cursor.h \
- libc3/uw.h \
+ libc3/float.h \
+ libc3/frame.c \
+ libc3/frame.h \
+ libc3/buf_inspect_s8_hexadecimal.h \
+ libc3/types.h \
+ libc3/buf_inspect_s8_hexadecimal.c \
+ libc3/buf_inspect_s8_decimal.h \
+ libc3/f64.h \
+ libc3/buf_inspect_s8_decimal.c \
+ libc3/f32.c \
+ libc3/f64.c \
+ libc3/buf_inspect_s8_octal.h \
+ libc3/buf_inspect_s8_octal.c \
+ libc3/buf_inspect_s8_binary.h \
+ libc3/buf_inspect_s8_binary.c \
+ libc3/buf_inspect_s8.c \
+ libc3/hash.h \
libc3/ident.h \
- libc3/str.c \
- libc3/c_types.h \
- libc3/buf_parse_s.c.in \
- libc3/array.c \
- libc3/buf_inspect.h \
- libc3/set.c.in \
- libc3/list.c \
+ libc3/integer.c \
+ libc3/integer.h \
+ libc3/io.h \
+ libc3/list.h \
libc3/log.c \
libc3/log.h \
- libc3/sym.h \
- libc3/c3.h \
+ libc3/buf_inspect_s.h.in \
+ libc3/module.c \
+ libc3/buf_inspect.h \
+ libc3/c3_main.h \
+ libc3/sequence.c \
+ libc3/sequence.h \
+ libc3/str.c \
libc3/module.h \
+ libc3/buf_parse_u.c.in \
libc3/quote.c \
libc3/quote.h \
- libc3/env.c \
- libc3/fn.c \
+ libc3/set.c.in \
libc3/set.h.in \
- libc3/tag.c \
+ libc3/buf_inspect_s_base.h.in \
+ libc3/map.h \
+ libc3/set_cursor.c.in \
+ libc3/set_cursor.h.in \
+ libc3/set_item.c.in \
+ libc3/set_item.h.in \
+ libc3/s.h.in \
+ libc3/sign.c \
+ libc3/sign.h \
+ libc3/skiplist.c.in \
libc3/skiplist.h.in \
- libc3/facts.h \
- libc3/sha1.h \
+ libc3/type.h \
libc3/skiplist_node.c.in \
libc3/skiplist_node.h.in \
+ libc3/str.h \
+ libc3/tag.c \
+ libc3/ucd.c \
+ libc3/sym.h \
libc3/tuple.c \
libc3/tuple.h \
- libc3/ucd.c \
+ libc3/type.c \
libc3/ucd.h \
- libc3/hash.h \
- libc3/license.c \
- libc3/str.h \
- libc3/type.h \
+ libc3/buf_parse_s.c.in \
libc3/buf_parse_s.h.in \
+ libc3/buf_inspect_s.c.in \
libc3/buf_parse_u.h.in \
- libc3/cfn.c \
- libc3/sequence.h \
- libc3/sequence.c \
- libc3/operator.h \
- libc3/float.h \
- libc3/f64.c \
- libc3/hash.c \
- libc3/frame.c \
+ libc3/ident.c \
+ libc3/env.c \
libc3/buf_inspect_s_base.c.in \
- libc3/buf_inspect_s.c.in \
- libc3/buf_inspect_s.h.in \
libc3/buf_inspect_u.c.in \
- libc3/buf_inspect_u_base.c.in \
libc3/buf_inspect_u.h.in \
- libc3/c3_main.h \
- libc3/call.c \
- libc3/arg.c \
- libc3/f32.c \
- libc3/buf_inspect_u_base.h.in \
libc3/env.h \
- libc3/integer.c \
- libc3/cfn.h \
- libc3/f32.h \
- libc3/facts.c \
- libc3/file.h \
- libc3/s.c.in \
- libc3/s.h.in \
- libc3/u.c.in \
- libc3/u.h.in \
- libc3/time.h \
- libc3/ptag.c \
- libc3/ptag.h \
- libc3/ident.c \
- libc3/list.h \
- libc3/arg.h \
+ libc3/buf_inspect_u_base.c.in \
+ libc3/buf_inspect_u_base.h.in \
libc3/timespec.c \
- libc3/buf_inspect_s_base.h.in \
- libc3/window/cairo/c3_window_cairo_demo.c \
- libc3/window/cairo/c3_window_cairo_demo.h \
- libc3/window/cairo/types.h \
- libc3/window/cairo/window_cairo.h \
+ libc3/map.c \
+ libc3/window/cairo/xcb/config.h \
+ libc3/window/cairo/xcb/window_cairo_xcb.c \
libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c \
- libc3/window/cairo/xcb/demo/window.c \
libc3/window/cairo/xcb/demo/c3_window_cairo_demo.c \
- libc3/window/cairo/xcb/window_cairo_xcb.c \
+ libc3/window/cairo/xcb/demo/window.c \
libc3/window/cairo/xcb/window_cairo_xcb.h \
- libc3/window/cairo/xcb/config.h \
+ libc3/window/cairo/types.h \
+ libc3/window/cairo/c3_window_cairo_demo.h \
+ libc3/window/cairo/window_cairo.h \
+ libc3/window/cairo/c3_window_cairo_demo.c \
libc3/window/cairo/window_cairo.c \
libc3/window/types.h \
- libc3/window/window.h \
libc3/window/window.c \
- libc3/time.c \
- libc3/var.c \
- libc3/f64.h \
- libc3/bool.h \
+ libc3/window/window.h \
+ libc3/u.c.in \
+ libc3/fn.c \
+ libc3/u.h.in \
+ libc3/sha1.h \
+ libc3/fn.h \
+ libc3/tag.h \
+ libc3/buf_parse.c \
+ libc3/facts.c \
+ libc3/license.c \
+ libc3/operator.c \
+ libc3/ptag.h \
+ libc3/f32.h \
+ libc3/fn_clause.h \
+ libc3/s.c.in \
+ libc3/operator.h \
+ libc3/sym.c \
+ libc3/fn_clause.c \
+ libc3/ptag.c \
libc3/var.h \
- test/facts_with_test.c \
- test/set__fact_test.c \
- test/test.c \
- test/fn_test.c \
- test/test.h \
+ libc3/var.c \
+ libc3/time.c \
+ libc3/time.h \
+ libc3/facts.h \
+ libc3/file.c \
+ libc3/file.h \
+ libc3/hash.c \
+ test/buf_inspect_test.c \
+ test/bool_test.c \
test/buf_parse_test.c \
- test/array_test.c \
- test/facts_cursor_test.c \
- test/set__tag_test.c \
- test/tag_test.c \
- test/sym_test.c \
- test/tag_test.h \
- test/tuple_test.c \
- test/types_test.c \
- test/call_test.c \
- test/compare_test.c \
- test/skiplist__fact_test.c \
- test/fact_test.c \
- test/compare_test.h \
- test/str_test.c \
test/facts_test.c \
- test/hash_test.c \
+ test/buf_file_test.c \
test/list_test.c \
- test/ident_test.c \
- test/libc3_test.c \
- test/buf_inspect_test.c \
- test/bool_test.c \
- test/cfn_test.c \
- test/buf_parse_test_s8.c \
+ test/test.c \
+ test/test.h \
+ test/buf_parse_test_u8.c \
+ test/buf_parse_test.h \
+ test/buf_parse_test_s16.c \
test/buf_parse_test_s32.c \
test/buf_parse_test_s64.c \
+ test/buf_parse_test_s8.c \
+ test/buf_parse_test_su.h \
test/buf_parse_test_u16.c \
- test/buf_parse_test_u8.c \
test/buf_parse_test_u32.c \
+ test/buf_test.c \
test/buf_parse_test_u64.c \
+ test/call_test.c \
+ test/facts_cursor_test.c \
+ test/cfn_test.c \
+ test/character_test.c \
+ test/compare_test.c \
+ test/compare_test.h \
test/env_test.c \
- test/buf_parse_test.h \
- test/buf_test.c \
+ test/fact_test.c \
test/fact_test.h \
- test/buf_file_test.c \
- test/character_test.c \
- test/buf_parse_test_su.h \
- test/buf_parse_test_s16.c \
+ test/facts_with_test.c \
+ test/hash_test.c \
+ test/ident_test.c \
+ test/set__fact_test.c \
+ test/set__tag_test.c \
+ test/skiplist__fact_test.c \
+ test/str_test.c \
+ test/sym_test.c \
+ test/tag_test.c \
+ test/tag_test.h \
+ test/array_test.c \
+ test/fn_test.c \
+ test/tuple_test.c \
+ test/types_test.c \
+ test/libc3_test.c \
ucd2c/ucd.h \
ucd2c/ucd2c.c \
diff --git a/sources.sh b/sources.sh
index 0800980..72b960e 100644
--- a/sources.sh
+++ b/sources.sh
@@ -1,4 +1,4 @@
# sources.sh generated by update_sources
-C3_CONFIGURES='c3c/configure c3s/configure c3s/update_sources ic3/configure ic3/update_sources libc3/update_sources libc3/configure libc3/window/cairo/xcb/configure libc3/window/cairo/xcb/demo/configure libc3/window/cairo/xcb/demo/update_sources libc3/window/cairo/xcb/update_sources libc3/window/configure libtommath/configure libtommath/update_sources test/configure test/update_sources ucd2c/configure '
+C3_CONFIGURES='c3c/configure c3s/configure c3s/update_sources ic3/configure ic3/update_sources libc3/configure libc3/update_sources libc3/window/cairo/xcb/configure libc3/window/cairo/xcb/update_sources libc3/window/cairo/xcb/demo/update_sources libc3/window/cairo/xcb/demo/configure libc3/window/configure libtommath/configure libtommath/update_sources test/configure test/update_sources ucd2c/configure '
C3_MAKEFILES='c3c/Makefile c3s/Makefile ic3/Makefile libc3/Makefile libc3/gen.mk libc3/window/cairo/xcb/Makefile libc3/window/cairo/xcb/demo/Makefile libc3/window/Makefile libtommath/Makefile test/Makefile ucd2c/Makefile '
-C3_C_SOURCES='c3c/c3c.c c3s/buf_readline.c c3s/c3s.c c3s/buf_readline.h ic3/buf_linenoise.c ic3/ic3.c ic3/buf_linenoise.h ic3/linenoise.c libc3/buf_inspect_s8_decimal.h libc3/fn.h libc3/buf_inspect_s8_hexadecimal.c libc3/sym.c libc3/buf_inspect_s8_hexadecimal.h libc3/buf_inspect_s16.c libc3/buf_inspect_s16.h libc3/buf_inspect_s16_binary.c libc3/buf_inspect_s16_binary.h libc3/buf_inspect_s16_octal.c libc3/buf_inspect_s16_octal.h libc3/buf_inspect_s16_decimal.c libc3/buf_inspect_s16_decimal.h libc3/buf_inspect_s16_hexadecimal.c libc3/s8.c libc3/binding.c libc3/binding.h libc3/buf_inspect_s8.c libc3/facts_with_cursor.c libc3/array.h libc3/buf.c libc3/buf_parse.c libc3/integer.h libc3/types.h libc3/type.c libc3/buf_inspect_s8.h libc3/buf_inspect_s8_binary.c libc3/buf_inspect_s8_binary.h libc3/buf_inspect_s8_octal.c libc3/buf_inspect_s8_octal.h libc3/buf_inspect_s8_decimal.c libc3/buf_inspect.c libc3/buf_file.c libc3/buf_file.h libc3/bool.c libc3/buf_inspect_s16_hexadecimal.h libc3/io.h libc3/buf_inspect_s32.c libc3/buf_inspect_s32.h libc3/buf_inspect_s32_binary.c libc3/buf_inspect_s32_binary.h libc3/buf_inspect_s32_octal.c libc3/buf_inspect_s32_octal.h libc3/buf_inspect_s32_decimal.c libc3/buf_inspect_s32_decimal.h libc3/buf_inspect_s32_hexadecimal.c libc3/buf_inspect_s32_hexadecimal.h libc3/buf_inspect_s64.c libc3/buf_inspect_s64.h libc3/buf_inspect_s64_binary.c libc3/io.c libc3/abs.h libc3/fn_clause.c libc3/buf_inspect_s64_binary.h libc3/buf_inspect_s64_octal.c libc3/buf_inspect_s64_octal.h libc3/buf_inspect_s64_decimal.c libc3/buf_inspect_s64_decimal.h libc3/buf_inspect_s64_hexadecimal.c libc3/buf_inspect_s64_hexadecimal.h libc3/buf_inspect_sw.c libc3/buf_inspect_sw.h libc3/buf_inspect_sw_binary.c libc3/set__fact.c libc3/file.c libc3/ceiling.c libc3/buf_parse_c.c libc3/buf_parse_c.h libc3/buf_inspect_sw_binary.h libc3/buf_save.c libc3/buf_inspect_sw_octal.c libc3/buf_parse.h libc3/compare.c libc3/buf_inspect_sw_octal.h libc3/buf_inspect_sw_decimal.c libc3/buf_inspect_sw_decimal.h libc3/buf_inspect_sw_hexadecimal.c libc3/buf_inspect_sw_hexadecimal.h libc3/call.h libc3/buf_inspect_u8.c libc3/buf_inspect_u8.h libc3/buf_parse_s8.c libc3/character.c libc3/buf_save.h libc3/fact.h libc3/buf_inspect_u8_binary.c libc3/error.c libc3/buf_inspect_u8_binary.h libc3/buf_inspect_u8_octal.c libc3/buf_inspect_u8_octal.h libc3/buf_inspect_u8_decimal.c libc3/buf_inspect_u8_decimal.h libc3/buf_inspect_u8_hexadecimal.c libc3/buf_inspect_u8_hexadecimal.h libc3/buf_inspect_u16.c libc3/buf_inspect_u16.h libc3/buf_inspect_u16_binary.c libc3/buf_inspect_u16_binary.h libc3/buf_inspect_u16_octal.c libc3/buf_parse_s8.h libc3/error.h libc3/character.h libc3/compare.h libc3/buf_inspect_u16_octal.h libc3/buf_inspect_u16_decimal.c libc3/tag.h libc3/sign.h libc3/buf.h libc3/buf_inspect_u16_decimal.h libc3/buf_inspect_u16_hexadecimal.c libc3/buf_inspect_u16_hexadecimal.h libc3/buf_inspect_u32.c libc3/buf_inspect_u32.h libc3/buf_inspect_u32_binary.c libc3/buf_inspect_u32_binary.h libc3/buf_inspect_u32_octal.c libc3/set__fact.h libc3/buf_inspect_u32_octal.h libc3/error_handler.c libc3/set_cursor.c.in libc3/set_cursor.h.in libc3/set_item.c.in libc3/set_item.h.in libc3/buf_inspect_u32_decimal.c libc3/buf_inspect_u32_decimal.h libc3/buf_inspect_u32_hexadecimal.c libc3/buf_inspect_u32_hexadecimal.h libc3/buf_inspect_u64.c libc3/buf_inspect_u64.h libc3/buf_inspect_u64_binary.c libc3/buf_inspect_u64_binary.h libc3/buf_inspect_u64_octal.c libc3/buf_inspect_u64_octal.h libc3/s8.h libc3/error_handler.h libc3/buf_inspect_u64_decimal.c libc3/eval.c libc3/eval.h libc3/buf_inspect_u64_decimal.h libc3/fact.c libc3/facts_cursor.c libc3/ceiling.h libc3/buf_inspect_u64_hexadecimal.c libc3/buf_inspect_u64_hexadecimal.h libc3/buf_inspect_uw.c libc3/buf_inspect_uw.h libc3/buf_inspect_uw_binary.c libc3/buf_inspect_uw_binary.h libc3/buf_inspect_uw_octal.c libc3/buf_inspect_uw_octal.h libc3/buf_inspect_uw_decimal.c libc3/buf_parse_s16.c libc3/facts_cursor.h libc3/facts_spec.c libc3/frame.h libc3/sign.c libc3/skiplist.c.in libc3/buf_inspect_uw_decimal.h libc3/buf_inspect_uw_hexadecimal.c libc3/buf_inspect_uw_hexadecimal.h libc3/buf_parse_s16.h libc3/buf_parse_s32.c libc3/buf_parse_s32.h libc3/buf_parse_s64.c libc3/buf_parse_s64.h libc3/buf_parse_sw.c libc3/buf_parse_sw.h libc3/buf_parse_u8.c libc3/buf_parse_u8.h libc3/buf_parse_u16.c libc3/timespec.h libc3/buf_parse_u16.h libc3/buf_parse_u32.c libc3/buf_parse_u32.h libc3/facts_spec.h libc3/facts_spec_cursor.c libc3/buf_parse_u64.c libc3/facts_spec_cursor.h libc3/buf_parse_u64.h libc3/buf_parse_uw.c libc3/buf_parse_uw.h libc3/set__tag.c libc3/set__tag.h libc3/set_cursor__fact.c libc3/set_cursor__fact.h libc3/set_cursor__tag.c libc3/set_cursor__tag.h libc3/set_item__fact.c libc3/set_item__fact.h libc3/operator.c libc3/set_item__tag.c libc3/s16.c libc3/c3.c libc3/set_item__tag.h libc3/facts_with.c libc3/facts_with.h libc3/skiplist__fact.c libc3/skiplist__fact.h libc3/buf_parse_u.c.in libc3/fn_clause.h libc3/skiplist_node__fact.c libc3/skiplist_node__fact.h libc3/s16.h libc3/s32.c libc3/s32.h libc3/s64.c libc3/s64.h libc3/sw.c libc3/sw.h libc3/u8.c libc3/u8.h libc3/u16.c libc3/u16.h libc3/u32.c libc3/u32.h libc3/u64.c libc3/module.c libc3/abs.c libc3/u64.h libc3/uw.c libc3/facts_with_cursor.h libc3/uw.h libc3/ident.h libc3/str.c libc3/c_types.h libc3/buf_parse_s.c.in libc3/array.c libc3/buf_inspect.h libc3/set.c.in libc3/list.c libc3/log.c libc3/log.h libc3/sym.h libc3/c3.h libc3/module.h libc3/quote.c libc3/quote.h libc3/env.c libc3/fn.c libc3/set.h.in libc3/tag.c libc3/skiplist.h.in libc3/facts.h libc3/sha1.h libc3/skiplist_node.c.in libc3/skiplist_node.h.in libc3/tuple.c libc3/tuple.h libc3/ucd.c libc3/ucd.h libc3/hash.h libc3/license.c libc3/str.h libc3/type.h libc3/buf_parse_s.h.in libc3/buf_parse_u.h.in libc3/cfn.c libc3/sequence.h libc3/sequence.c libc3/operator.h libc3/float.h libc3/f64.c libc3/hash.c libc3/frame.c libc3/buf_inspect_s_base.c.in libc3/buf_inspect_s.c.in libc3/buf_inspect_s.h.in libc3/buf_inspect_u.c.in libc3/buf_inspect_u_base.c.in libc3/buf_inspect_u.h.in libc3/c3_main.h libc3/call.c libc3/arg.c libc3/f32.c libc3/buf_inspect_u_base.h.in libc3/env.h libc3/integer.c libc3/cfn.h libc3/f32.h libc3/facts.c libc3/file.h libc3/s.c.in libc3/s.h.in libc3/u.c.in libc3/u.h.in libc3/time.h libc3/ptag.c libc3/ptag.h libc3/ident.c libc3/list.h libc3/arg.h libc3/timespec.c libc3/buf_inspect_s_base.h.in libc3/window/cairo/c3_window_cairo_demo.c libc3/window/cairo/c3_window_cairo_demo.h libc3/window/cairo/types.h libc3/window/cairo/window_cairo.h libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c libc3/window/cairo/xcb/demo/window.c libc3/window/cairo/xcb/demo/c3_window_cairo_demo.c libc3/window/cairo/xcb/window_cairo_xcb.c libc3/window/cairo/xcb/window_cairo_xcb.h libc3/window/cairo/xcb/config.h libc3/window/cairo/window_cairo.c libc3/window/types.h libc3/window/window.h libc3/window/window.c libc3/time.c libc3/var.c libc3/f64.h libc3/bool.h libc3/var.h test/facts_with_test.c test/set__fact_test.c test/test.c test/fn_test.c test/test.h test/buf_parse_test.c test/array_test.c test/facts_cursor_test.c test/set__tag_test.c test/tag_test.c test/sym_test.c test/tag_test.h test/tuple_test.c test/types_test.c test/call_test.c test/compare_test.c test/skiplist__fact_test.c test/fact_test.c test/compare_test.h test/str_test.c test/facts_test.c test/hash_test.c test/list_test.c test/ident_test.c test/libc3_test.c test/buf_inspect_test.c test/bool_test.c test/cfn_test.c test/buf_parse_test_s8.c test/buf_parse_test_s32.c test/buf_parse_test_s64.c test/buf_parse_test_u16.c test/buf_parse_test_u8.c test/buf_parse_test_u32.c test/buf_parse_test_u64.c test/env_test.c test/buf_parse_test.h test/buf_test.c test/fact_test.h test/buf_file_test.c test/character_test.c test/buf_parse_test_su.h test/buf_parse_test_s16.c ucd2c/ucd.h ucd2c/ucd2c.c '
+C3_C_SOURCES='c3c/c3c.c c3s/buf_readline.c c3s/c3s.c c3s/buf_readline.h ic3/ic3.c ic3/buf_linenoise.c ic3/buf_linenoise.h ic3/linenoise.c libc3/abs.c libc3/abs.h libc3/buf.c libc3/buf.h libc3/set__tag.c libc3/set_item__tag.c libc3/set__tag.h libc3/set_item__tag.h libc3/set_cursor__tag.c libc3/set_cursor__tag.h libc3/skiplist_node__fact.c libc3/skiplist_node__fact.h libc3/skiplist__fact.c libc3/skiplist__fact.h libc3/set_item__fact.c libc3/call.c libc3/arg.c libc3/arg.h libc3/array.c libc3/array.h libc3/binding.c libc3/c3.c libc3/set_item__fact.h libc3/set__fact.c libc3/set__fact.h libc3/set_cursor__fact.c libc3/binding.h libc3/set_cursor__fact.h libc3/uw.h libc3/uw.c libc3/sw.h libc3/sw.c libc3/buf_parse_uw.h libc3/buf_parse_uw.c libc3/buf_parse_sw.h libc3/buf_parse_sw.c libc3/buf_inspect_uw_hexadecimal.h libc3/buf_inspect_uw_hexadecimal.c libc3/buf_inspect_uw.h libc3/bool.c libc3/bool.h libc3/buf_file.c libc3/buf_file.h libc3/buf_inspect_uw_decimal.h libc3/buf_inspect_uw_decimal.c libc3/buf_inspect_uw_octal.h libc3/buf_inspect_uw_octal.c libc3/buf_inspect_uw_binary.h libc3/buf_inspect_uw_binary.c libc3/buf_inspect_sw_hexadecimal.h libc3/buf_inspect_uw.c libc3/buf_inspect_sw_hexadecimal.c libc3/buf_inspect_sw_decimal.h libc3/buf_inspect_sw_decimal.c libc3/buf_inspect_sw_octal.h libc3/buf_parse.h libc3/buf_parse_c.c libc3/buf_save.c libc3/facts_spec_cursor.c libc3/buf_inspect_sw_octal.c libc3/buf_inspect_sw_binary.h libc3/buf_inspect_sw_binary.c libc3/buf_inspect_sw.h libc3/buf_inspect_sw.c libc3/u64.h libc3/u64.c libc3/s64.h libc3/s64.c libc3/buf_parse_u64.c libc3/buf_parse_u64.h libc3/buf_parse_s64.h libc3/buf_parse_s64.c libc3/buf_inspect_u64_hexadecimal.h libc3/buf_inspect_u64_hexadecimal.c libc3/buf_inspect_u64.h libc3/buf_parse_c.h libc3/buf_save.h libc3/c3.h libc3/c_types.h libc3/call.h libc3/buf_inspect_u64_decimal.c libc3/buf_inspect_u64_decimal.h libc3/buf_inspect_u64_octal.h libc3/buf_inspect_u64_octal.c libc3/buf_inspect_u64_binary.h libc3/buf_inspect_u64_binary.c libc3/buf_inspect_u64.c libc3/buf_inspect_s64_hexadecimal.h libc3/buf_inspect_s64_hexadecimal.c libc3/buf_inspect_s64_decimal.h libc3/buf_inspect_s64_decimal.c libc3/io.c libc3/ceiling.c libc3/ceiling.h libc3/cfn.c libc3/cfn.h libc3/character.c libc3/character.h libc3/buf_inspect_s64_octal.h libc3/buf_inspect_s64_octal.c libc3/buf_inspect_s64_binary.h libc3/buf_inspect_s64_binary.c libc3/buf_inspect_s64.h libc3/buf_inspect_s64.c libc3/u32.c libc3/u32.h libc3/s32.h libc3/s32.c libc3/buf_parse_u32.h libc3/buf_parse_u32.c libc3/buf_parse_s32.h libc3/buf_parse_s32.c libc3/buf_inspect_u32_hexadecimal.h libc3/compare.c libc3/buf_inspect.c libc3/compare.h libc3/timespec.h libc3/buf_inspect_u32_hexadecimal.c libc3/buf_inspect_u32_decimal.h libc3/buf_inspect_u32_decimal.c libc3/buf_inspect_u32_octal.h libc3/buf_inspect_u32_octal.c libc3/buf_inspect_u32_binary.h libc3/buf_inspect_u32.h libc3/buf_inspect_u32_binary.c libc3/buf_inspect_u32.c libc3/buf_inspect_s32_hexadecimal.h libc3/buf_inspect_s32.h libc3/error.c libc3/error.h libc3/error_handler.c libc3/error_handler.h libc3/eval.c libc3/eval.h libc3/buf_inspect_s32_hexadecimal.c libc3/buf_inspect_s32_decimal.h libc3/buf_inspect_s32_decimal.c libc3/buf_inspect_s32_octal.h libc3/buf_inspect_s32_octal.c libc3/buf_inspect_s32_binary.h libc3/buf_inspect_s32_binary.c libc3/buf_inspect_s32.c libc3/u16.h libc3/u16.c libc3/s16.h libc3/s16.c libc3/buf_parse_u16.h libc3/buf_parse_u16.c libc3/fact.c libc3/fact.h libc3/facts_cursor.c libc3/buf_parse_s16.h libc3/buf_parse_s16.c libc3/buf_inspect_u16_hexadecimal.h libc3/buf_inspect_u16_hexadecimal.c libc3/buf_inspect_u16_decimal.h libc3/buf_inspect_u16_decimal.c libc3/buf_inspect_u16_octal.h libc3/buf_inspect_u16_octal.c libc3/buf_inspect_u16_binary.h libc3/buf_inspect_u16_binary.c libc3/buf_inspect_u16.h libc3/buf_inspect_u16.c libc3/buf_inspect_s16_hexadecimal.h libc3/list.c libc3/facts_cursor.h libc3/facts_spec.c libc3/facts_spec.h libc3/facts_spec_cursor.h libc3/buf_inspect_s16_hexadecimal.c libc3/buf_inspect_s16_decimal.h libc3/buf_inspect_s16_decimal.c libc3/buf_inspect_s16_octal.h libc3/buf_inspect_s16_octal.c libc3/buf_inspect_s16_binary.h libc3/buf_inspect_s16_binary.c libc3/buf_inspect_s16.c libc3/buf_inspect_s16.h libc3/u8.h libc3/s8.h libc3/u8.c libc3/s8.c libc3/buf_parse_u8.h libc3/facts_with.c libc3/facts_with.h libc3/facts_with_cursor.c libc3/buf_parse_u8.c libc3/buf_parse_s8.h libc3/buf_inspect_u8_hexadecimal.h libc3/buf_parse_s8.c libc3/buf_inspect_u8_hexadecimal.c libc3/buf_inspect_u8_decimal.h libc3/buf_inspect_u8_decimal.c libc3/buf_inspect_u8_octal.h libc3/buf_inspect_u8_octal.c libc3/buf_inspect_u8_binary.h libc3/buf_inspect_u8_binary.c libc3/buf_inspect_u8.h libc3/buf_inspect_u8.c libc3/buf_inspect_s8.h libc3/facts_with_cursor.h libc3/float.h libc3/frame.c libc3/frame.h libc3/buf_inspect_s8_hexadecimal.h libc3/types.h libc3/buf_inspect_s8_hexadecimal.c libc3/buf_inspect_s8_decimal.h libc3/f64.h libc3/buf_inspect_s8_decimal.c libc3/f32.c libc3/f64.c libc3/buf_inspect_s8_octal.h libc3/buf_inspect_s8_octal.c libc3/buf_inspect_s8_binary.h libc3/buf_inspect_s8_binary.c libc3/buf_inspect_s8.c libc3/hash.h libc3/ident.h libc3/integer.c libc3/integer.h libc3/io.h libc3/list.h libc3/log.c libc3/log.h libc3/buf_inspect_s.h.in libc3/module.c libc3/buf_inspect.h libc3/c3_main.h libc3/sequence.c libc3/sequence.h libc3/str.c libc3/module.h libc3/buf_parse_u.c.in libc3/quote.c libc3/quote.h libc3/set.c.in libc3/set.h.in libc3/buf_inspect_s_base.h.in libc3/map.h libc3/set_cursor.c.in libc3/set_cursor.h.in libc3/set_item.c.in libc3/set_item.h.in libc3/s.h.in libc3/sign.c libc3/sign.h libc3/skiplist.c.in libc3/skiplist.h.in libc3/type.h libc3/skiplist_node.c.in libc3/skiplist_node.h.in libc3/str.h libc3/tag.c libc3/ucd.c libc3/sym.h libc3/tuple.c libc3/tuple.h libc3/type.c libc3/ucd.h libc3/buf_parse_s.c.in libc3/buf_parse_s.h.in libc3/buf_inspect_s.c.in libc3/buf_parse_u.h.in libc3/ident.c libc3/env.c libc3/buf_inspect_s_base.c.in libc3/buf_inspect_u.c.in libc3/buf_inspect_u.h.in libc3/env.h libc3/buf_inspect_u_base.c.in libc3/buf_inspect_u_base.h.in libc3/timespec.c libc3/map.c libc3/window/cairo/xcb/config.h libc3/window/cairo/xcb/window_cairo_xcb.c libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c libc3/window/cairo/xcb/demo/c3_window_cairo_demo.c libc3/window/cairo/xcb/demo/window.c libc3/window/cairo/xcb/window_cairo_xcb.h libc3/window/cairo/types.h libc3/window/cairo/c3_window_cairo_demo.h libc3/window/cairo/window_cairo.h libc3/window/cairo/c3_window_cairo_demo.c libc3/window/cairo/window_cairo.c libc3/window/types.h libc3/window/window.c libc3/window/window.h libc3/u.c.in libc3/fn.c libc3/u.h.in libc3/sha1.h libc3/fn.h libc3/tag.h libc3/buf_parse.c libc3/facts.c libc3/license.c libc3/operator.c libc3/ptag.h libc3/f32.h libc3/fn_clause.h libc3/s.c.in libc3/operator.h libc3/sym.c libc3/fn_clause.c libc3/ptag.c libc3/var.h libc3/var.c libc3/time.c libc3/time.h libc3/facts.h libc3/file.c libc3/file.h libc3/hash.c test/buf_inspect_test.c test/bool_test.c test/buf_parse_test.c test/facts_test.c test/buf_file_test.c test/list_test.c test/test.c test/test.h test/buf_parse_test_u8.c test/buf_parse_test.h test/buf_parse_test_s16.c test/buf_parse_test_s32.c test/buf_parse_test_s64.c test/buf_parse_test_s8.c test/buf_parse_test_su.h test/buf_parse_test_u16.c test/buf_parse_test_u32.c test/buf_test.c test/buf_parse_test_u64.c test/call_test.c test/facts_cursor_test.c test/cfn_test.c test/character_test.c test/compare_test.c test/compare_test.h test/env_test.c test/fact_test.c test/fact_test.h test/facts_with_test.c test/hash_test.c test/ident_test.c test/set__fact_test.c test/set__tag_test.c test/skiplist__fact_test.c test/str_test.c test/sym_test.c test/tag_test.c test/tag_test.h test/array_test.c test/fn_test.c test/tuple_test.c test/types_test.c test/libc3_test.c ucd2c/ucd.h ucd2c/ucd2c.c '