diff --git a/img/earth.jpg b/img/earth.jpg
new file mode 100644
index 0000000..4379f8f
Binary files /dev/null and b/img/earth.jpg differ
diff --git a/img/earth.png b/img/earth.png
new file mode 100644
index 0000000..df1fe95
Binary files /dev/null and b/img/earth.png differ
diff --git a/libc3/buf_inspect.c b/libc3/buf_inspect.c
index b5bd0d2..f7af8bb 100644
--- a/libc3/buf_inspect.c
+++ b/libc3/buf_inspect.c
@@ -1229,7 +1229,7 @@ sw buf_inspect_map (s_buf *buf, const s_map *map)
return r;
result += r;
while (i < map->count) {
- k = map->keys + i;
+ k = map->key + i;
if (k->type == TAG_SYM) {
if ((r = buf_write_1(buf, k->data.sym->str.ptr.ps8)) < 0)
return r;
@@ -1239,14 +1239,14 @@ sw buf_inspect_map (s_buf *buf, const s_map *map)
result += r;
}
else {
- if ((r = buf_inspect_tag(buf, map->keys + i)) < 0)
+ if ((r = buf_inspect_tag(buf, map->key + 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)
+ if ((r = buf_inspect_tag(buf, map->value + i)) < 0)
return r;
result += r;
i++;
diff --git a/libc3/compare.c b/libc3/compare.c
index 1d15169..613d93c 100644
--- a/libc3/compare.c
+++ b/libc3/compare.c
@@ -311,8 +311,8 @@ s8 compare_map (const s_map *a, const s_map *b)
if (a->count > b->count)
return 1;
while (i < a->count) {
- if ((r = compare_tag(a->keys + i, b->keys + i)) ||
- (r = compare_tag(a->values + i, b->values + i)))
+ if ((r = compare_tag(a->key + i, b->key + i)) ||
+ (r = compare_tag(a->value + i, b->value + i)))
return r;
i++;
}
diff --git a/libc3/env.c b/libc3/env.c
index bc2782a..54d9e2e 100644
--- a/libc3/env.c
+++ b/libc3/env.c
@@ -351,8 +351,8 @@ bool env_eval_equal_map (s_env *env, const s_map *a,
while (i < a->count) {
j = 0;
while (j < b->count) {
- if (! compare_tag(a->keys + i, b->keys + j)) {
- if (! env_eval_equal_tag(env, a->values + i, b->values + j,
+ if (! compare_tag(a->key + i, b->key + j)) {
+ if (! env_eval_equal_tag(env, a->value + i, b->value + j,
&tmp)) {
return false;
}
@@ -624,8 +624,8 @@ bool env_eval_map (s_env *env, const s_map *map, s_tag *dest)
if (! map_init(&tmp, map->count))
return false;
while (i < tmp.count) {
- if (! env_eval_tag(env, map->keys + i, tmp.keys + i) ||
- ! env_eval_tag(env, map->values + i, tmp.values + i))
+ if (! env_eval_tag(env, map->key + i, tmp.key + i) ||
+ ! env_eval_tag(env, map->value + i, tmp.value + i))
goto ko;
i++;
}
@@ -775,6 +775,34 @@ s_env * env_init (s_env *env, int argc, s8 **argv)
return env;
}
+const s_list * env_get_struct_type_spec (s_env *env,
+ const s_sym *module)
+{
+ s_facts_cursor cursor;
+ s_tag tag_defstruct;
+ s_tag tag_module;
+ s_tag tag_var;
+ tag_init_sym_1(&tag_defstruct, "defstruct");
+ tag_init_sym(&tag_module, module);
+ tag_init_var(&tag_var);
+ env_module_maybe_reload(env, module, &env->facts);
+ facts_with_tags(&env->facts, &cursor, &tag_module,
+ &tag_defstruct, &tag_var);
+ if (! facts_cursor_next(&cursor)) {
+ warnx("env_get_struct_type_spec: module %s"
+ " does not use defstruct",
+ module->str.ptr.ps8);
+ return NULL;
+ }
+ if (tag_var.type != TAG_LIST) {
+ warnx("env_get_struct_type_spec: module %s"
+ " has a defstruct that is not a property list",
+ module->str.ptr.ps8);
+ return NULL;
+ }
+ return tag_var.data.list;
+}
+
s_env * env_init_args (s_env *env, int argc, s8 **argv)
{
s8 a[PATH_MAX];
@@ -819,7 +847,7 @@ void env_longjmp (s_env *env, jmp_buf *jmp_buf)
longjmp(*jmp_buf, 1);
}
-bool env_module_load (const s_sym *module, s_env *env, s_facts *facts)
+bool env_module_load (s_env *env, const s_sym *module, s_facts *facts)
{
s_str path;
s_tag tag_module_name;
@@ -848,7 +876,7 @@ bool env_module_load (const s_sym *module, s_env *env, s_facts *facts)
return true;
}
-bool env_module_maybe_reload (const s_sym *module, s_env *env,
+bool env_module_maybe_reload (s_env *env, const s_sym *module,
s_facts *facts)
{
s_str path;
diff --git a/libc3/env.h b/libc3/env.h
index 635e46c..055d154 100644
--- a/libc3/env.h
+++ b/libc3/env.h
@@ -21,7 +21,11 @@ extern s_env g_c3_env;
void env_clean (s_env *env);
s_env * env_init (s_env *env, int argc, s8 **argv);
-/* Modifiers. */
+/* Observers. */
+const s_list * env_get_struct_type_spec (s_env *env,
+ const s_sym *module);
+
+/* Operators. */
bool env_eval_array (s_env *env, const s_array *array,
s_array *dest);
bool env_eval_array_tag (s_env *env, const s_array *array,
@@ -56,9 +60,9 @@ bool env_eval_quote (s_env *env, const s_quote *quote,
bool env_eval_tag (s_env *env, const s_tag *tag, s_tag *dest);
bool env_eval_tuple (s_env *env, const s_tuple *tuple,
s_tag *dest);
-bool env_module_load (const s_sym *module, s_env *env,
+bool env_module_load (s_env *env, const s_sym *module,
s_facts *facts);
-bool env_module_maybe_reload (const s_sym *module, s_env *env,
+bool env_module_maybe_reload (s_env *env, const s_sym *module,
s_facts *facts);
s8 env_operator_arity (s_env *env, const s_ident *op);
bool env_operator_find (s_env *env, const s_ident *op);
diff --git a/libc3/hash.c b/libc3/hash.c
index e060f2f..04954f7 100644
--- a/libc3/hash.c
+++ b/libc3/hash.c
@@ -226,8 +226,8 @@ void hash_update_map (t_hash *hash, const s_map *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);
+ hash_update_tag(hash, map->key + i);
+ hash_update_tag(hash, map->value + i);
i++;
}
}
diff --git a/libc3/list_init.c b/libc3/list_init.c
index ebe66d5..540a0f0 100644
--- a/libc3/list_init.c
+++ b/libc3/list_init.c
@@ -28,6 +28,7 @@
#include "integer.h"
#include "list.h"
#include "map.h"
+#include "ptr.h"
#include "quote.h"
#include "str.h"
#include "tag.h"
@@ -182,6 +183,18 @@ s_list * list_init_map_1 (s_list *list, const s8 *p, s_list *next)
return list;
}
+s_list * list_init_ptr (s_list *list, const s_sym *type, void *p,
+ s_list *next)
+{
+ s_list tmp;
+ assert(list);
+ list_init(&tmp, next);
+ if (! tag_init_ptr(&tmp.tag, type, p))
+ return NULL;
+ *list = tmp;
+ return list;
+}
+
s_list * list_init_s8 (s_list *list, s8 i, s_list *next)
{
s_list tmp;
@@ -553,6 +566,19 @@ s_list * list_new_map_1 (const s8 *p, s_list *next)
return list;
}
+s_list * list_new_ptr (const s_sym *type, void *p, s_list *next)
+{
+ s_list *list;
+ list = list_new(next);
+ if (! list)
+ return NULL;
+ if (! tag_init_ptr(&list->tag, type, p)) {
+ free(list);
+ return NULL;
+ }
+ return list;
+}
+
s_list * list_new_s8 (s8 i, s_list *next)
{
s_list *list;
diff --git a/libc3/list_init.h b/libc3/list_init.h
index 1d973d5..ce79ec4 100644
--- a/libc3/list_init.h
+++ b/libc3/list_init.h
@@ -35,6 +35,8 @@ s_list * list_init_integer_zero (s_list *list, s_list *next);
s_list * list_init_map (s_list *list, uw count, s_list *next);
s_list * list_init_map_1 (s_list *list, const s8 *p, s_list *next);
+s_list * list_init_ptr (s_list *list, const s_sym *type, void *p,
+ s_list *next);
s_list * list_init_s8 (s_list *list, s8 i, s_list *next);
s_list * list_init_s16 (s_list *list, s16 i, s_list *next);
s_list * list_init_s32 (s_list *list, s32 i, s_list *next);
@@ -75,6 +77,7 @@ s_list * list_new_integer_zero (s_list *next);
s_list * list_new_map (uw count, s_list *next);
s_list * list_new_map_1 (const s8 *p, s_list *next);
+s_list * list_new_ptr (const s_sym *type, void *p, s_list *next);
s_list * list_new_s8 (s8 i, s_list *next);
s_list * list_new_s16 (s16 i, s_list *next);
s_list * list_new_s32 (s32 i, s_list *next);
@@ -113,6 +116,7 @@ s_list * list_integer_zero (s_list *list);
s_list * list_map (s_list *list, uw count);
s_list * list_map_1 (s_list *list, const s8 *p);
+s_list * list_ptr (s_list *list, const s_sym *type, void *p);
s_list * list_s8 (s_list *list, s8 i);
s_list * list_s16 (s_list *list, s16 i);
s_list * list_s32 (s_list *list, s32 i);
diff --git a/libc3/map.c b/libc3/map.c
index 529e4e5..f3776cf 100644
--- a/libc3/map.c
+++ b/libc3/map.c
@@ -49,12 +49,12 @@ void map_clean (s_map *map)
uw i = 0;
assert(map);
while (i < map->count) {
- tag_clean(map->keys + i);
- tag_clean(map->values + i);
+ tag_clean(map->key + i);
+ tag_clean(map->value + i);
i++;
}
- free(map->keys);
- free(map->values);
+ free(map->key);
+ free(map->value);
}
void map_delete (s_map *map)
@@ -68,8 +68,8 @@ 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_init_copy(value, map->values + i);
+ if (compare_tag(key, map->key + i) == 0)
+ return tag_init_copy(value, map->value + i);
i++;
}
return NULL;
@@ -79,8 +79,8 @@ 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));
+ map->key = calloc(count, sizeof(s_tag));
+ map->value = calloc(count, sizeof(s_tag));
return map;
}
@@ -106,8 +106,8 @@ s_map * map_init_copy (s_map *map, const s_map *src)
assert(map);
map_init(map, src->count);
while (i < src->count) {
- tag_init_copy(map->keys + i, src->keys + i);
- tag_init_copy(map->values + i, src->values + i);
+ tag_init_copy(map->key + i, src->key + i);
+ tag_init_copy(map->value + i, src->value + i);
i++;
}
return map;
@@ -129,8 +129,8 @@ s_map * map_init_from_lists (s_map *map, const s_list *keys,
k = keys;
v = values;
while (i < len) {
- if (! tag_init_copy(map->keys + i, &k->tag) ||
- ! tag_init_copy(map->values + i, &v->tag))
+ if (! tag_init_copy(map->key + i, &k->tag) ||
+ ! tag_init_copy(map->value + i, &v->tag))
goto ko;
k = list_next(k);
v = list_next(v);
@@ -156,8 +156,8 @@ s_list ** map_map (const s_map *map, const s_fn *fn, s_list **result)
t = &tmp;
*t = NULL;
while (i < map->count) {
- args = list_new_copy(map->keys + i,
- list_new_copy(map->values + i, NULL));
+ args = list_new_copy(map->key + i,
+ list_new_copy(map->value + i, NULL));
*t = list_new(NULL);
if (! eval_fn_call(fn, args, &(*t)->tag)) {
list_delete_all(args);
@@ -206,8 +206,8 @@ 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_init_copy(map->values + i, value))
+ if (compare_tag(key, map->key + i) == 0) {
+ if (! tag_init_copy(map->value + i, value))
return NULL;
return map;
}
@@ -228,13 +228,13 @@ s_map * map_sort (s_map *map)
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;
+ if (compare_tag(map->key + j, map->key + (j - 1)) < 0) {
+ k = map->key[j];
+ v = map->value[j];
+ map->key[j] = map->key[j - 1];
+ map->value[j] = map->value[j - 1];
+ map->key[j - 1] = k;
+ map->value[j - 1] = v;
}
j++;
}
@@ -249,8 +249,8 @@ s_map * map_update (const s_map *map, const s_tag *key,
uw i = 0;
map_init_copy(&tmp, map);
while (i < map->count) {
- if (compare_tag(key, map->keys + i) == 0) {
- if (! tag_init_copy(map->values + i, value))
+ if (compare_tag(key, map->key + i) == 0) {
+ if (! tag_init_copy(map->value + i, value))
goto ko;
*dest = tmp;
return dest;
diff --git a/libc3/module.c b/libc3/module.c
index 8d4c91d..8b1c706 100644
--- a/libc3/module.c
+++ b/libc3/module.c
@@ -51,7 +51,7 @@ bool module_ensure_loaded (const s_sym *module, s_facts *facts)
bool module_load (const s_sym *module, s_facts *facts)
{
- return env_module_load(module, &g_c3_env, facts);
+ return env_module_load(&g_c3_env, module, facts);
}
s_tag * module_load_time (const s_sym *module, s_facts *facts,
@@ -77,7 +77,7 @@ s_tag * module_load_time (const s_sym *module, s_facts *facts,
bool module_maybe_reload (const s_sym *module, s_facts *facts)
{
- return env_module_maybe_reload(module, &g_c3_env, facts);
+ return env_module_maybe_reload(&g_c3_env, module, facts);
}
s_str * module_path (const s_sym *module, const s_str *prefix,
diff --git a/libc3/ptr.c b/libc3/ptr.c
new file mode 100644
index 0000000..50cbb0a
--- /dev/null
+++ b/libc3/ptr.c
@@ -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.
+ */
+#include <assert.h>
+#include <err.h>
+#include <stdlib.h>
+#include "ptr.h"
+
+void ptr_delete (s_ptr *ptr)
+{
+ free(ptr);
+}
+
+s_ptr * ptr_init (s_ptr *ptr, const s_sym *type, void *p)
+{
+ assert(ptr);
+ ptr->type = type;
+ ptr->p = p;
+ return ptr;
+}
+
+s_ptr * ptr_new (const s_sym *type, void *p)
+{
+ s_ptr *ptr;
+ ptr = calloc(1, sizeof(s_ptr));
+ if (! ptr) {
+ warn("ptr_new: ptr");
+ return NULL;
+ }
+ if (! ptr_init(ptr, type, p)) {
+ free(ptr);
+ return NULL;
+ }
+ return ptr;
+}
diff --git a/libc3/ptr.h b/libc3/ptr.h
new file mode 100644
index 0000000..92e93d0
--- /dev/null
+++ b/libc3/ptr.h
@@ -0,0 +1,25 @@
+/* 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_PTR_H
+#define LIBC3_PTR_H
+
+#include "types.h"
+
+/* Stack-allocation compatible functions. */
+s_ptr * ptr_init (s_ptr *ptr, const s_sym *type, void *p);
+
+/* Heap-allocation functions, call ptr_delete after use. */
+void ptr_delete (s_ptr *ptr);
+s_ptr * ptr_new (const s_sym *type, void *p);
+
+#endif /* LIBC3_PTR_H */
diff --git a/libc3/sources.mk b/libc3/sources.mk
index 08c3473..7ae53b9 100644
--- a/libc3/sources.mk
+++ b/libc3/sources.mk
@@ -107,6 +107,7 @@ HEADERS = \
module.h \
operator.h \
ptag.h \
+ ptr.h \
quote.h \
s16.h \
s32.h \
@@ -249,6 +250,7 @@ SOURCES = \
module.c \
operator.c \
ptag.c \
+ ptr.c \
quote.c \
s16.c \
s32.c \
@@ -399,6 +401,7 @@ LO_SOURCES = \
module.c \
operator.c \
ptag.c \
+ ptr.c \
quote.c \
s16.c \
s32.c \
diff --git a/libc3/sources.sh b/libc3/sources.sh
index e3bad94..63cbf00 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_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 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 list_init.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 struct.h struct_type.h sw.h sym.h tag.h tag_init.h tag_type.h time.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_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 list_init.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 struct.c struct_type.c sw.c sym.c tag.c tag_add.c tag_band.c tag_bor.c tag_bxor.c tag_div.c tag_init.c tag_mod.c tag_mul.c tag_shift_left.c tag_shift_right.c tag_sub.c tag_type.c time.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_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 list_init.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 struct.c struct_type.c sw.c sym.c tag.c tag_add.c tag_band.c tag_bor.c tag_bxor.c tag_div.c tag_init.c tag_mod.c tag_mul.c tag_shift_left.c tag_shift_right.c tag_sub.c tag_type.c time.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_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 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 list_init.h log.h map.h module.h operator.h ptag.h ptr.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 struct.h struct_type.h sw.h sym.h tag.h tag_init.h tag_type.h time.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_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 list_init.c log.c map.c module.c operator.c ptag.c ptr.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 struct.c struct_type.c sw.c sym.c tag.c tag_add.c tag_band.c tag_bor.c tag_bxor.c tag_div.c tag_init.c tag_mod.c tag_mul.c tag_shift_left.c tag_shift_right.c tag_sub.c tag_type.c time.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_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 list_init.c log.c map.c module.c operator.c ptag.c ptr.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 struct.c struct_type.c sw.c sym.c tag.c tag_add.c tag_band.c tag_bor.c tag_bxor.c tag_div.c tag_init.c tag_mod.c tag_mul.c tag_shift_left.c tag_shift_right.c tag_sub.c tag_type.c time.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/struct.c b/libc3/struct.c
index a0e9558..bdce226 100644
--- a/libc3/struct.c
+++ b/libc3/struct.c
@@ -13,10 +13,12 @@
#include <assert.h>
#include <err.h>
#include <stdlib.h>
+#include "env.h"
#include "map.h"
#include "struct.h"
#include "struct_type.h"
#include "sym.h"
+#include "tag.h"
#include "tag_type.h"
void struct_clean (s_struct *s)
@@ -28,14 +30,16 @@ void struct_clean (s_struct *s)
assert(s);
assert(s->type);
data = s->data;
- while (i < s->type->map.count) {
- sym = tag_type_to_sym(s->type->map.values[i].type);
- clean = sym_to_clean(sym);
- if (clean)
- clean(data + s->type->offsets[i]);
- i++;
+ while (i < s->type.map.count) {
+ if (tag_type(s->type.map.value + i, &sym)) {
+ clean = sym_to_clean(sym);
+ if (clean)
+ clean(data + s->type.offset[i]);
+ i++;
+ }
}
free(data);
+ struct_type_clean(&s->type);
}
void struct_delete (s_struct *s)
@@ -47,11 +51,11 @@ void struct_delete (s_struct *s)
s_struct * struct_init (s_struct *s, const s_sym *module)
{
- s_struct_type struct_type;
assert(s);
- if (! struct_type_init(&struct_type, module))
+ assert(module);
+ if (! struct_type_init_from_env(&s->type, module, &g_c3_env))
return NULL;
- s->data = calloc(1, struct_type.size);
+ s->data = calloc(s->type.size, 1);
return s;
}
diff --git a/libc3/struct_type.c b/libc3/struct_type.c
index b134259..9dcd4fe 100644
--- a/libc3/struct_type.c
+++ b/libc3/struct_type.c
@@ -13,46 +13,77 @@
#include <assert.h>
#include <err.h>
#include <stdlib.h>
+#include "env.h"
+#include "list.h"
#include "map.h"
#include "struct.h"
#include "struct_type.h"
#include "sym.h"
#include "tag_type.h"
-void struct_type_clean (s_struct_type *s)
+void struct_type_clean (s_struct_type *st)
{
- assert(s);
- map_clean(&s->map);
- free(s->offsets);
+ assert(st);
+ map_clean(&st->map);
+ free(st->offset);
}
-void struct_type_delete (s_struct_type *s)
+void struct_type_delete (s_struct_type *st)
{
- assert(s);
- struct_type_clean(s);
- free(s);
+ assert(st);
+ struct_type_clean(st);
+ free(st);
}
-s_struct_type * struct_type_init (s_struct_type *s, const s_sym *module)
+s_struct_type * struct_type_init (s_struct_type *st, const s_sym *module,
+ const s_list *spec)
{
- assert(s);
+ uw count;
+ assert(st);
assert(module);
- (void) module;
- return s;
+ assert(spec);
+ count = list_length(spec);
+ st->module = module;
+ if (! map_init(&st->map, count))
+ return NULL;
+ st->offset = calloc(count, sizeof(uw));
+ if (! st->offset) {
+ warn("struct_type_init: offset array of size %lu", count);
+ map_clean(&st->map);
+ return NULL;
+ }
+ return st;
+}
+
+s_struct_type * struct_type_init_from_env (s_struct_type *st,
+ const s_sym *module,
+ s_env *env)
+{
+ const s_list *spec;
+ assert(st);
+ assert(module);
+ assert(env);
+ spec = env_get_struct_type_spec(env, module);
+ if (! spec)
+ return NULL;
+ if (! struct_type_init(st, module, spec))
+ return NULL;
+ return st;
}
-s_struct_type * struct_type_new (const s_sym *module)
+s_struct_type * struct_type_new (const s_sym *module,
+ const s_list *spec)
{
- s_struct_type *s;
+ s_struct_type *st;
assert(module);
- s = calloc(1, sizeof(s_struct_type));
- if (! s) {
+ st = calloc(1, sizeof(s_struct_type));
+ if (! st) {
warn("struct_type_new: %s: calloc", module->str.ptr.ps8);
return NULL;
}
- if (! struct_type_init(s, module)) {
- free(s);
+ if (! struct_type_init(st, module, spec)) {
+ free(st);
return NULL;
}
- return s;
+ return st;
}
diff --git a/libc3/struct_type.h b/libc3/struct_type.h
index 2e6e448..81a84af 100644
--- a/libc3/struct_type.h
+++ b/libc3/struct_type.h
@@ -27,10 +27,15 @@
/* Stack-allocation compatible functions, call struct_type_clean after
use. */
void struct_type_clean (s_struct_type *s);
-s_struct_type * struct_type_init (s_struct_type *s, const s_sym *module);
+s_struct_type * struct_type_init (s_struct_type *s, const s_sym *module,
+ const s_list *spec);
+s_struct_type * struct_type_init_from_env (s_struct_type *st,
+ const s_sym *module,
+ s_env *env);
/* Heap-allocation functions, call struct_type_delete after use. */
void struct_type_delete (s_struct_type *s);
-s_struct_type * struct_type_new (const s_sym *module);
+s_struct_type * struct_type_new (const s_sym *module,
+ const s_list *spec);
#endif /* LIBC3_STRUCT_TYPE_H */
diff --git a/libc3/tag_init.c b/libc3/tag_init.c
index b897837..1fd9448 100644
--- a/libc3/tag_init.c
+++ b/libc3/tag_init.c
@@ -28,6 +28,7 @@
#include "integer.h"
#include "list.h"
#include "map.h"
+#include "ptr.h"
#include "quote.h"
#include "str.h"
#include "tag.h"
@@ -184,6 +185,17 @@ s_tag * tag_init_map_1 (s_tag *tag, const s8 *p)
return tag;
}
+s_tag * tag_init_ptr (s_tag *tag, const s_sym *type, void *p)
+{
+ s_tag tmp = {0};
+ assert(tag);
+ tmp.type = TAG_PTR;
+ if (! ptr_init(&tmp.data.ptr, type, p))
+ return NULL;
+ *tag = tmp;
+ return tag;
+}
+
s_tag * tag_init_s8 (s_tag *tag, s8 i)
{
s_tag tmp = {0};
@@ -560,6 +572,21 @@ s_tag * tag_new_map_1 (const s8 *p)
return tag;
}
+s_tag * tag_new_ptr (const s_sym *type, void *p)
+{
+ s_tag *tag;
+ if (! (tag = calloc(1, sizeof(s_tag)))) {
+ warn("tag_new_ptr: calloc");
+ return NULL;
+ }
+ tag->type = TAG_PTR;
+ if (! ptr_init(&tag->data.ptr, type, p)) {
+ free(tag);
+ return NULL;
+ }
+ return tag;
+}
+
s_tag * tag_new_s8 (s8 i)
{
s_tag *tag;
@@ -952,6 +979,18 @@ s_tag * tag_map_1 (s_tag *tag, const s8 *p)
return tag;
}
+s_tag * tag_ptr (s_tag *tag, const s_sym *type, void *p)
+{
+ s_tag tmp = {0};
+ assert(tag);
+ tag_clean(tag);
+ tmp.type = TAG_PTR;
+ if (! ptr_init(&tmp.data.ptr, type, p))
+ return NULL;
+ *tag = tmp;
+ return tag;
+}
+
s_tag * tag_s8 (s_tag *tag, s8 i)
{
s_tag tmp = {0};
diff --git a/libc3/tag_init.h b/libc3/tag_init.h
index 4cc6ec1..7d77294 100644
--- a/libc3/tag_init.h
+++ b/libc3/tag_init.h
@@ -32,6 +32,7 @@ s_tag * tag_init_integer_zero (s_tag *tag);
s_tag * tag_init_list (s_tag *tag, s_list *list);
s_tag * tag_init_map (s_tag *tag, uw count);
s_tag * tag_init_map_1 (s_tag *tag, const s8 *p);
+s_tag * tag_init_ptr (s_tag *tag, const s_sym *type, void *p);
s_tag * tag_init_s8 (s_tag *tag, s8 i);
s_tag * tag_init_s16 (s_tag *tag, s16 i);
s_tag * tag_init_s32 (s_tag *tag, s32 i);
@@ -69,6 +70,7 @@ s_tag * tag_new_integer_zero (void);
s_tag * tag_new_list (s_list *list);
s_tag * tag_new_map (uw count);
s_tag * tag_new_map_1 (const s8 *p);
+s_tag * tag_new_ptr (const s_sym *type, void *p);
s_tag * tag_new_s8 (s8 i);
s_tag * tag_new_s16 (s16 i);
s_tag * tag_new_s32 (s32 i);
@@ -106,6 +108,7 @@ s_tag * tag_integer_zero (s_tag *tag);
s_tag * tag_list (s_tag *tag, s_list *list);
s_tag * tag_map (s_tag *tag, uw count);
s_tag * tag_map_1 (s_tag *tag, const s8 *p);
+s_tag * tag_ptr (s_tag *tag, const s_sym *type, void *p);
s_tag * tag_s8 (s_tag *tag, s8 i);
s_tag * tag_s16 (s_tag *tag, s16 i);
s_tag * tag_s32 (s_tag *tag, s32 i);
diff --git a/libc3/tag_init.rb b/libc3/tag_init.rb
index f19fe44..46b9b92 100644
--- a/libc3/tag_init.rb
+++ b/libc3/tag_init.rb
@@ -330,6 +330,9 @@ class TagInitList
TagInit.new("map", "TAG_MAP", :init_mode_init,
[Arg.new("uw", "count")]),
TagInit1.new("map", "1", "TAG_MAP", :init_mode_init),
+ TagInit.new("ptr", "TAG_PTR", :init_mode_init,
+ [Arg.new("const s_sym *", "type"),
+ Arg.new("void *", "p")]),
TagInit.new("s8", "TAG_S8", :init_mode_direct,
[Arg.new("s8", "i")]),
TagInit.new("s16", "TAG_S16", :init_mode_direct,
@@ -492,6 +495,7 @@ tag_init_c.content = <<EOF
#include "integer.h"
#include "list.h"
#include "map.h"
+#include "ptr.h"
#include "quote.h"
#include "str.h"
#include "tag.h"
@@ -541,6 +545,7 @@ list_init_c.content = <<EOF
#include "integer.h"
#include "list.h"
#include "map.h"
+#include "ptr.h"
#include "quote.h"
#include "str.h"
#include "tag.h"
diff --git a/libc3/types.h b/libc3/types.h
index 79ce8f9..5573ea5 100644
--- a/libc3/types.h
+++ b/libc3/types.h
@@ -230,8 +230,8 @@ struct frame {
struct map {
uw count;
- s_tag *keys; /* sorted (see tag_compare) */
- s_tag *values;
+ s_tag *key; /* sorted (see tag_compare) */
+ s_tag *value;
};
struct ptr {
@@ -255,16 +255,10 @@ struct quote {
s_tag *tag;
};
-struct struct_ {
- void *data;
- bool free;
- s_struct_type *type;
-};
-
struct struct_type {
const s_sym *module;
s_map map;
- uw *offsets;
+ uw *offset;
uw size;
};
@@ -332,6 +326,12 @@ struct str {
u_ptr ptr; /**< Pointer to memory. */
};
+struct struct_ {
+ void *data;
+ bool free;
+ s_struct_type type;
+};
+
/* 3 */
struct call {
/* key */
diff --git a/libc3/window/cairo/demo/flies.c b/libc3/window/cairo/demo/flies.c
index b738adc..1fddd63 100644
--- a/libc3/window/cairo/demo/flies.c
+++ b/libc3/window/cairo/demo/flies.c
@@ -41,9 +41,9 @@ static void fly_init (s_map *map)
s_array *board;
uw *in;
f64 *t;
- board = &map->values[0].data.array;
- in = &map->values[1].data.uw;
- t = &map->values[3].data.f64;
+ board = &map->value[0].data.array;
+ in = &map->value[1].data.uw;
+ t = &map->value[3].data.f64;
array_data_set(board, address, &g_board_item_fly);
*t = 0.0;
(*in)++;
@@ -60,16 +60,16 @@ bool flies_load (s_sequence *seq,
(void) window;
tag_map(&seq->tag, 4);
map = &seq->tag.data.map;
- tag_init_sym_1( map->keys + 0, "board");
- tag_init_array(map->values + 0, sym_1("U8"),
+ tag_init_sym_1( map->key + 0, "board");
+ tag_init_array(map->value + 0, sym_1("U8"),
2, (uw[]) {BOARD_SIZE, BOARD_SIZE});
- tag_init_sym_1(map->keys + 1, "in");
- tag_init_uw( map->values + 1, 0);
- tag_init_sym_1(map->keys + 2, "out");
- tag_init_uw( map->values + 2, 0);
- tag_init_sym_1(map->keys + 3, "t");
- tag_init_uw( map->values + 3, 0);
- board = &map->values[0].data.array;
+ tag_init_sym_1(map->key + 1, "in");
+ tag_init_uw( map->value + 1, 0);
+ tag_init_sym_1(map->key + 2, "out");
+ tag_init_uw( map->value + 2, 0);
+ tag_init_sym_1(map->key + 3, "t");
+ tag_init_uw( map->value + 3, 0);
+ board = &map->value[0].data.array;
board->data = malloc(board->size);
i = 0;
while (i < BOARD_SIZE) {
@@ -164,14 +164,14 @@ bool flies_render (s_sequence *seq, s_window_cairo *window,
if (seq->tag.type == TAG_MAP) {
map = &seq->tag.data.map;
if (map->count == 4 &&
- map->values[0].type == TAG_ARRAY &&
- map->values[1].type == TAG_UW &&
- map->values[2].type == TAG_UW &&
- map->values[3].type == TAG_UW) {
- board = &map->values[0].data.array;
- fly_in = &map->values[1].data.uw;
- fly_out = &map->values[2].data.uw;
- fly_time = &map->values[3].data.uw;
+ map->value[0].type == TAG_ARRAY &&
+ map->value[1].type == TAG_UW &&
+ map->value[2].type == TAG_UW &&
+ map->value[3].type == TAG_UW) {
+ board = &map->value[0].data.array;
+ fly_in = &map->value[1].data.uw;
+ fly_out = &map->value[2].data.uw;
+ fly_time = &map->value[3].data.uw;
board_item_h = (f64) (window->h - 60) / (BOARD_SIZE + 1);
board_item_w = board_item_h * g_xy_ratio;
board_w = board_item_w * BOARD_SIZE;
diff --git a/libc3/window/cairo/demo/lightspeed.c b/libc3/window/cairo/demo/lightspeed.c
index 395bc5d..9416f62 100644
--- a/libc3/window/cairo/demo/lightspeed.c
+++ b/libc3/window/cairo/demo/lightspeed.c
@@ -20,12 +20,12 @@ static void star_init (s_tag *star)
f64_random(&x);
f64_random(&y);
tag_init_map(star, 3);
- tag_init_sym(star->data.map.keys, sym_1("speed"));
- tag_init_f64(star->data.map.values, 0.0);
- tag_init_sym(star->data.map.keys + 1, sym_1("x"));
- tag_init_f64(star->data.map.values + 1, 2.0 * x - 1.0);
- tag_init_sym(star->data.map.keys + 2, sym_1("y"));
- tag_init_f64(star->data.map.values + 2, 2.0 * y - 1.0);
+ tag_init_sym(star->data.map.key, sym_1("speed"));
+ tag_init_f64(star->data.map.value, 0.0);
+ tag_init_sym(star->data.map.key + 1, sym_1("x"));
+ tag_init_f64(star->data.map.value + 1, 2.0 * x - 1.0);
+ tag_init_sym(star->data.map.key + 2, sym_1("y"));
+ tag_init_f64(star->data.map.value + 2, 2.0 * y - 1.0);
}
static void star_render (s_tag *star, s_window_cairo *window,
@@ -36,9 +36,9 @@ static void star_render (s_tag *star, s_window_cairo *window,
f64 *x;
f64 *y;
(void) window;
- speed = &star->data.map.values[0].data.f64;
- x = &star->data.map.values[1].data.f64;
- y = &star->data.map.values[2].data.f64;
+ speed = &star->data.map.value[0].data.f64;
+ x = &star->data.map.value[1].data.f64;
+ y = &star->data.map.value[2].data.f64;
cairo_set_line_width(cr, 0.004);
cairo_set_source_rgb(cr, 1, 1, 1);
cairo_move_to(cr, *x, *y);
diff --git a/libc3/window/cairo/demo/toasters.c b/libc3/window/cairo/demo/toasters.c
index d706b0b..5aa0143 100644
--- a/libc3/window/cairo/demo/toasters.c
+++ b/libc3/window/cairo/demo/toasters.c
@@ -32,10 +32,10 @@ static bool toasters_render_toasts (s_list **toasts,
static s_tag * toast_init (s_tag *toast, f64 x, f64 y)
{
tag_init_map(toast, 2);
- tag_init_sym(toast->data.map.keys + 0, sym_1("x"));
- tag_init_f64(toast->data.map.values + 0, x);
- tag_init_sym(toast->data.map.keys + 1, sym_1("y"));
- tag_init_f64(toast->data.map.values + 1, y);
+ tag_init_sym(toast->data.map.key + 0, sym_1("x"));
+ tag_init_f64(toast->data.map.value + 0, x);
+ tag_init_sym(toast->data.map.key + 1, sym_1("y"));
+ tag_init_f64(toast->data.map.value + 1, y);
return toast;
}
@@ -47,8 +47,8 @@ static void toast_render (s_tag *toast, s_window_cairo *window,
f64 *x;
f64 *y;
if (toast->type == TAG_MAP) {
- x = &toast->data.map.values[0].data.f64;
- y = &toast->data.map.values[1].data.f64;
+ x = &toast->data.map.value[0].data.f64;
+ y = &toast->data.map.value[1].data.f64;
*x -= seq->dt * g_speed_x;
*y -= seq->dt * g_speed_y;
if (*x < -100 || *y > window->h) {
@@ -66,10 +66,10 @@ static void toast_render (s_tag *toast, s_window_cairo *window,
static s_tag * toaster_init (s_tag *toaster, f64 y)
{
tag_init_map(toaster, 2);
- tag_init_sym_1(toaster->data.map.keys + 0, "x");
- tag_init_f64(toaster->data.map.values + 0, -150);
- tag_init_sym_1(toaster->data.map.keys + 1, "y");
- tag_init_f64(toaster->data.map.values + 1, y);
+ tag_init_sym_1(toaster->data.map.key + 0, "x");
+ tag_init_f64(toaster->data.map.value + 0, -150);
+ tag_init_sym_1(toaster->data.map.key + 1, "y");
+ tag_init_f64(toaster->data.map.value + 1, y);
return toaster;
}
@@ -80,8 +80,8 @@ static void toaster_render (s_tag *toaster, s_window_cairo *window,
f64 *x;
f64 *y;
if (toaster->type == TAG_MAP) {
- x = &toaster->data.map.values[0].data.f64;
- y = &toaster->data.map.values[1].data.f64;
+ x = &toaster->data.map.value[0].data.f64;
+ y = &toaster->data.map.value[1].data.f64;
*x += seq->dt * g_speed_x;
*y += seq->dt * g_speed_y;
if (*x > window->w || *y < -200) {
@@ -106,10 +106,10 @@ bool toasters_load (s_sequence *seq,
(void) window;
tag_map(&seq->tag, 2);
map = &seq->tag.data.map;
- tag_init_sym_1( map->keys + 0, "toasters");
- tag_init_list(map->values + 0, NULL);
- tag_init_sym_1( map->keys + 1, "toasts");
- tag_init_list(map->values + 1, NULL);
+ tag_init_sym_1( map->key + 0, "toasters");
+ tag_init_list(map->value + 0, NULL);
+ tag_init_sym_1( map->key + 1, "toasts");
+ tag_init_list(map->value + 1, NULL);
return true;
}
@@ -123,8 +123,8 @@ bool toasters_render (s_sequence *seq, s_window_cairo *window,
cairo_fill(cr);
/* io_inspect(&seq->tag); */
if (seq->tag.type == TAG_MAP) {
- toasters = &seq->tag.data.map.values[0].data.list;
- toasts = &seq->tag.data.map.values[1].data.list;
+ toasters = &seq->tag.data.map.value[0].data.list;
+ toasts = &seq->tag.data.map.value[1].data.list;
toasters_render_toasts(toasts, window, cr, seq);
toasters_render_toasters(toasters, window, cr, seq);
}
@@ -146,26 +146,26 @@ bool toasters_render_toasts (s_list **toasts, s_window_cairo *window,
assert(seq);
y = window->w * g_speed_y / g_speed_x - 210;
if (*toasts && (*toasts)->tag.type == TAG_MAP) {
- t = &(*toasts)->tag.data.map.values[0].data.list;
- y = (*toasts)->tag.data.map.values[1].data.f64;
+ t = &(*toasts)->tag.data.map.value[0].data.list;
+ y = (*toasts)->tag.data.map.value[1].data.f64;
}
while (y < window->h - 100) {
y += 170.0;
*toasts = list_new_map(2, *toasts);
map = &(*toasts)->tag.data.map;
- tag_init_sym_1(map->keys + 0, "toasts");
- tag_init_list(map->values + 0, NULL);
- tag_init_sym_1(map->keys + 1, "y");
- tag_init_f64(map->values + 1, y);
+ tag_init_sym_1(map->key + 0, "toasts");
+ tag_init_list(map->value + 0, NULL);
+ tag_init_sym_1(map->key + 1, "y");
+ tag_init_f64(map->value + 1, y);
}
i = *toasts;
while (i) {
if (i->tag.type == TAG_MAP) {
- t = &i->tag.data.map.values[0].data.list;
- y = i->tag.data.map.values[1].data.f64;
+ t = &i->tag.data.map.value[0].data.list;
+ y = i->tag.data.map.value[1].data.f64;
x = 0.0;
if (*t && (*t)->tag.type == TAG_MAP)
- x = (*t)->tag.data.map.values[0].data.f64;
+ x = (*t)->tag.data.map.value[0].data.f64;
if (x < window->w - 160.0) {
*t = list_new(*t);
toast_init(&(*t)->tag, window->w, y);
@@ -199,26 +199,26 @@ bool toasters_render_toasters (s_list **toasters,
/* io_inspect_list((const s_list **) toasters); */
y = -100.0;
if (*toasters && (*toasters)->tag.type == TAG_MAP) {
- t = &(*toasters)->tag.data.map.values[0].data.list;
- y = (*toasters)->tag.data.map.values[1].data.f64;
+ t = &(*toasters)->tag.data.map.value[0].data.list;
+ y = (*toasters)->tag.data.map.value[1].data.f64;
}
while (y < window->h - window->w * g_speed_y / g_speed_x) {
y += 170.0;
*toasters = list_new_map(2, *toasters);
map = &(*toasters)->tag.data.map;
- tag_init_sym_1(map->keys + 0, "toasters");
- tag_init_list(map->values + 0, NULL);
- tag_init_sym_1(map->keys + 1, "y");
- tag_init_f64(map->values + 1, y);
+ tag_init_sym_1(map->key + 0, "toasters");
+ tag_init_list(map->value + 0, NULL);
+ tag_init_sym_1(map->key + 1, "y");
+ tag_init_f64(map->value + 1, y);
}
i = *toasters;
while (i) {
if (i->tag.type == TAG_MAP) {
- t = &i->tag.data.map.values[0].data.list;
- y = i->tag.data.map.values[1].data.f64;
+ t = &i->tag.data.map.value[0].data.list;
+ y = i->tag.data.map.value[1].data.f64;
x = 1000.0;
if (*t && (*t)->tag.type == TAG_MAP)
- x = (*t)->tag.data.map.values[0].data.f64;
+ x = (*t)->tag.data.map.value[0].data.f64;
if (x > 60.0) {
*t = list_new(*t);
toaster_init(&(*t)->tag, y);
diff --git a/libc3/window/sdl2/configure b/libc3/window/sdl2/configure
index d6fb421..011aaa3 100755
--- a/libc3/window/sdl2/configure
+++ b/libc3/window/sdl2/configure
@@ -46,6 +46,7 @@ config_gnu
pkg_config ftgl
pkg_config gl
pkg_config glu
+pkg_config glut
pkg_config libbsd-overlay
pkg_config libpng
config_lib OPENGL -framework OpenGL
diff --git a/libc3/window/sdl2/demo/configure b/libc3/window/sdl2/demo/configure
index 57be739..a2f9401 100755
--- a/libc3/window/sdl2/demo/configure
+++ b/libc3/window/sdl2/demo/configure
@@ -53,6 +53,7 @@ config_gnu
pkg_config ftgl
pkg_config gl
pkg_config glu
+pkg_config glut
pkg_config libbsd-overlay
pkg_config libpng
config_lib OPENGL -framework OpenGL
diff --git a/libc3/window/sdl2/demo/earth.c b/libc3/window/sdl2/demo/earth.c
new file mode 100644
index 0000000..34ee0af
--- /dev/null
+++ b/libc3/window/sdl2/demo/earth.c
@@ -0,0 +1,82 @@
+/* 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 <math.h>
+#include <libc3/c3.h>
+#include "../window_sdl2.h"
+#include "../sdl2_font.h"
+#include "../sdl2_sprite.h"
+#include "../gl_camera.h"
+#include "../gl_sphere.h"
+#include "earth.h"
+
+#define EARTH_SEGMENTS 10
+
+s_sdl2_sprite g_sprite_earth = {0};
+
+bool earth_load (s_sequence *seq,
+ s_window_sdl2 *window)
+{
+ s_map *map;
+ s_gl_camera *camera;
+ s_gl_sphere *sphere;
+ (void) window;
+ // FIXME: leak
+ camera = gl_camera_new(window->w, window->h);
+ if (! camera)
+ return false;
+ sphere = gl_sphere_new(EARTH_SEGMENTS);
+ if (! sphere)
+ return false;
+ if (! tag_map(&seq->tag, 2))
+ return false;
+ map = &seq->tag.data.map;
+ tag_init_sym_1(map->key + 0, "camera");
+ tag_init_ptr(map->value + 0, sym_1("GL.Camera"), camera);
+ tag_init_sym_1(map->key + 1, "sphere");
+ tag_init_ptr(map->value + 1, sym_1("GL.Sphere"), sphere);
+ return true;
+}
+
+bool earth_render (s_sequence *seq, s_window_sdl2 *window,
+ void *context)
+{
+ s_gl_camera *camera;
+ s_map *map;
+ s_gl_sphere *sphere;
+ assert(seq);
+ assert(window);
+ (void) context;
+ if (! seq || seq->tag.type != TAG_MAP ||
+ seq->tag.data.map.count < 2) {
+ warnx("earth_render: invalid seq->tag");
+ return false;
+ }
+ map = &seq->tag.data.map;
+ if (map->value[0].type != TAG_PTR ||
+ map->value[1].type != TAG_PTR) {
+ warnx("earth_render: invalid map");
+ return false;
+ }
+ camera = map->value[0].data.ptr.p;
+ sphere = map->value[1].data.ptr.p;
+ gl_camera_set_aspect_ratio(camera, window->w, window->h);
+ gl_camera_render(camera);
+ glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ glDisable(GL_TEXTURE_2D);
+ //sdl2_sprite_bind(&g_sprite_earth, 0);
+ glPointSize(4.0);
+ gl_sphere_render(sphere);
+ return true;
+}
diff --git a/libc3/window/sdl2/demo/earth.h b/libc3/window/sdl2/demo/earth.h
new file mode 100644
index 0000000..9c573f0
--- /dev/null
+++ b/libc3/window/sdl2/demo/earth.h
@@ -0,0 +1,26 @@
+/* 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 EARTH_H
+#define EARTH_H
+
+#include "../types.h"
+#include "window_sdl2_demo.h"
+
+extern s_sdl2_sprite g_sprite_earth;
+extern s_sdl2_sprite g_sprite_earth_night;
+
+bool earth_load (s_sequence *seq, s_window_sdl2 *window);
+bool earth_render (s_sequence *seq, s_window_sdl2 *window,
+ void *context);
+
+#endif /* EARTH_H */
diff --git a/libc3/window/sdl2/demo/flies.c b/libc3/window/sdl2/demo/flies.c
index 96c8e59..9057034 100644
--- a/libc3/window/sdl2/demo/flies.c
+++ b/libc3/window/sdl2/demo/flies.c
@@ -42,9 +42,9 @@ static void fly_init (s_map *map)
s_array *board;
uw *in;
f64 *t;
- board = &map->values[0].data.array;
- in = &map->values[1].data.uw;
- t = &map->values[3].data.f64;
+ board = &map->value[0].data.array;
+ in = &map->value[1].data.uw;
+ t = &map->value[3].data.f64;
array_data_set(board, address, &g_board_item_fly);
*t = 0.0;
(*in)++;
@@ -61,16 +61,16 @@ bool flies_load (s_sequence *seq,
(void) window;
tag_map(&seq->tag, 4);
map = &seq->tag.data.map;
- tag_init_sym_1( map->keys + 0, "board");
- tag_init_array(map->values + 0, sym_1("U8"),
+ tag_init_sym_1( map->key + 0, "board");
+ tag_init_array(map->value + 0, sym_1("U8"),
2, (uw[]) {BOARD_SIZE, BOARD_SIZE});
- tag_init_sym_1(map->keys + 1, "in");
- tag_init_uw( map->values + 1, 0);
- tag_init_sym_1(map->keys + 2, "out");
- tag_init_uw( map->values + 2, 0);
- tag_init_sym_1(map->keys + 3, "t");
- tag_init_uw( map->values + 3, 0);
- board = &map->values[0].data.array;
+ tag_init_sym_1(map->key + 1, "in");
+ tag_init_uw( map->value + 1, 0);
+ tag_init_sym_1(map->key + 2, "out");
+ tag_init_uw( map->value + 2, 0);
+ tag_init_sym_1(map->key + 3, "t");
+ tag_init_uw( map->value + 3, 0);
+ board = &map->value[0].data.array;
board->data = malloc(board->size);
i = 0;
while (i < BOARD_SIZE) {
@@ -164,14 +164,14 @@ bool flies_render (s_sequence *seq, s_window_sdl2 *window,
if (seq->tag.type == TAG_MAP) {
map = &seq->tag.data.map;
if (map->count == 4 &&
- map->values[0].type == TAG_ARRAY &&
- map->values[1].type == TAG_UW &&
- map->values[2].type == TAG_UW &&
- map->values[3].type == TAG_UW) {
- board = &map->values[0].data.array;
- fly_in = &map->values[1].data.uw;
- fly_out = &map->values[2].data.uw;
- fly_time = &map->values[3].data.uw;
+ map->value[0].type == TAG_ARRAY &&
+ map->value[1].type == TAG_UW &&
+ map->value[2].type == TAG_UW &&
+ map->value[3].type == TAG_UW) {
+ board = &map->value[0].data.array;
+ fly_in = &map->value[1].data.uw;
+ fly_out = &map->value[2].data.uw;
+ fly_time = &map->value[3].data.uw;
board_item_h = (f64) (window->h - 60) / (BOARD_SIZE + 1);
board_item_w = board_item_h * g_xy_ratio;
board_w = board_item_w * BOARD_SIZE;
diff --git a/libc3/window/sdl2/demo/lightspeed.c b/libc3/window/sdl2/demo/lightspeed.c
index ecf7594..83e90af 100644
--- a/libc3/window/sdl2/demo/lightspeed.c
+++ b/libc3/window/sdl2/demo/lightspeed.c
@@ -24,13 +24,13 @@ static void star_init (s_tag *star)
f64_random(&y);
if (star->type != TAG_MAP || star->data.map.count != 3) {
tag_map(star, 3);
- tag_init_sym(star->data.map.keys + 0, sym_1("speed"));
- tag_init_sym(star->data.map.keys + 1, sym_1("x"));
- tag_init_sym(star->data.map.keys + 2, sym_1("y"));
+ tag_init_sym(star->data.map.key + 0, sym_1("speed"));
+ tag_init_sym(star->data.map.key + 1, sym_1("x"));
+ tag_init_sym(star->data.map.key + 2, sym_1("y"));
}
- tag_init_f64(star->data.map.values + 0, 0.0);
- tag_init_f64(star->data.map.values + 1, 2.0 * x - 1.0);
- tag_init_f64(star->data.map.values + 2, 2.0 * y - 1.0);
+ tag_init_f64(star->data.map.value + 0, 0.0);
+ tag_init_f64(star->data.map.value + 1, 2.0 * x - 1.0);
+ tag_init_f64(star->data.map.value + 2, 2.0 * y - 1.0);
}
static void star_render (s_tag *star, s_sequence *seq)
@@ -41,9 +41,9 @@ static void star_render (s_tag *star, s_sequence *seq)
f64 *y;
if (star->type != TAG_MAP || star->data.map.count < 3)
star_init(star);
- speed = &star->data.map.values[0].data.f64;
- x = &star->data.map.values[1].data.f64;
- y = &star->data.map.values[2].data.f64;
+ speed = &star->data.map.value[0].data.f64;
+ x = &star->data.map.value[1].data.f64;
+ y = &star->data.map.value[2].data.f64;
glVertex2d(*x, *y);
q = (1 + *speed / 20);
glVertex2d(*x * q, *y * q);
diff --git a/libc3/window/sdl2/demo/sources.mk b/libc3/window/sdl2/demo/sources.mk
index cfa2451..57bd467 100644
--- a/libc3/window/sdl2/demo/sources.mk
+++ b/libc3/window/sdl2/demo/sources.mk
@@ -1,12 +1,15 @@
# sources.mk generated by update_sources
HEADERS = \
bg_rect.h \
+ earth.h \
flies.h \
lightspeed.h \
toasters.h \
+ window_sdl2_demo.h \
SOURCES = \
bg_rect.c \
+ earth.c \
flies.c \
lightspeed.c \
toasters.c \
diff --git a/libc3/window/sdl2/demo/sources.sh b/libc3/window/sdl2/demo/sources.sh
index 47c2b90..162072a 100644
--- a/libc3/window/sdl2/demo/sources.sh
+++ b/libc3/window/sdl2/demo/sources.sh
@@ -1,3 +1,3 @@
# sources.sh generated by update_sources
-HEADERS='bg_rect.h flies.h lightspeed.h toasters.h '
-SOURCES='bg_rect.c flies.c lightspeed.c toasters.c window_sdl2_demo.c '
+HEADERS='bg_rect.h earth.h flies.h lightspeed.h toasters.h window_sdl2_demo.h '
+SOURCES='bg_rect.c earth.c flies.c lightspeed.c toasters.c window_sdl2_demo.c '
diff --git a/libc3/window/sdl2/demo/toasters.c b/libc3/window/sdl2/demo/toasters.c
index d1ea652..8fbc2a0 100644
--- a/libc3/window/sdl2/demo/toasters.c
+++ b/libc3/window/sdl2/demo/toasters.c
@@ -30,10 +30,10 @@ static bool toasters_render_toasts (s_list **toasts,
static s_tag * toast_init (s_tag *toast, f64 x, f64 y)
{
tag_init_map(toast, 2);
- tag_init_sym(toast->data.map.keys + 0, sym_1("x"));
- tag_init_f64(toast->data.map.values + 0, x);
- tag_init_sym(toast->data.map.keys + 1, sym_1("y"));
- tag_init_f64(toast->data.map.values + 1, y);
+ tag_init_sym(toast->data.map.key + 0, sym_1("x"));
+ tag_init_f64(toast->data.map.value + 0, x);
+ tag_init_sym(toast->data.map.key + 1, sym_1("y"));
+ tag_init_f64(toast->data.map.value + 1, y);
return toast;
}
@@ -44,8 +44,8 @@ static void toast_render (s_tag *toast, s_window_sdl2 *window,
f64 *x;
f64 *y;
if (toast->type == TAG_MAP) {
- x = &toast->data.map.values[0].data.f64;
- y = &toast->data.map.values[1].data.f64;
+ x = &toast->data.map.value[0].data.f64;
+ y = &toast->data.map.value[1].data.f64;
*x -= seq->dt * g_speed_x;
*y -= seq->dt * g_speed_y;
if (*x < -100 || *y > window->h) {
@@ -64,10 +64,10 @@ static void toast_render (s_tag *toast, s_window_sdl2 *window,
static s_tag * toaster_init (s_tag *toaster, f64 y)
{
tag_init_map(toaster, 2);
- tag_init_sym_1(toaster->data.map.keys + 0, "x");
- tag_init_f64(toaster->data.map.values + 0, -150);
- tag_init_sym_1(toaster->data.map.keys + 1, "y");
- tag_init_f64(toaster->data.map.values + 1, y);
+ tag_init_sym_1(toaster->data.map.key + 0, "x");
+ tag_init_f64(toaster->data.map.value + 0, -150);
+ tag_init_sym_1(toaster->data.map.key + 1, "y");
+ tag_init_f64(toaster->data.map.value + 1, y);
return toaster;
}
@@ -77,8 +77,8 @@ static void toaster_render (s_tag *toaster, s_window_sdl2 *window,
f64 *x;
f64 *y;
if (toaster->type == TAG_MAP) {
- x = &toaster->data.map.values[0].data.f64;
- y = &toaster->data.map.values[1].data.f64;
+ x = &toaster->data.map.value[0].data.f64;
+ y = &toaster->data.map.value[1].data.f64;
*x += seq->dt * g_speed_x;
*y += seq->dt * g_speed_y;
if (*x > window->w || *y < -200) {
@@ -103,10 +103,10 @@ bool toasters_load (s_sequence *seq,
(void) window;
tag_map(&seq->tag, 2);
map = &seq->tag.data.map;
- tag_init_sym_1( map->keys + 0, "toasters");
- tag_init_list(map->values + 0, NULL);
- tag_init_sym_1( map->keys + 1, "toasts");
- tag_init_list(map->values + 1, NULL);
+ tag_init_sym_1( map->key + 0, "toasters");
+ tag_init_list(map->value + 0, NULL);
+ tag_init_sym_1( map->key + 1, "toasts");
+ tag_init_list(map->value + 1, NULL);
return true;
}
@@ -123,8 +123,8 @@ bool toasters_render (s_sequence *seq, s_window_sdl2 *window,
glScalef(1, -1, 1);
/* io_inspect(&seq->tag); */
if (seq->tag.type == TAG_MAP) {
- toasters = &seq->tag.data.map.values[0].data.list;
- toasts = &seq->tag.data.map.values[1].data.list;
+ toasters = &seq->tag.data.map.value[0].data.list;
+ toasts = &seq->tag.data.map.value[1].data.list;
toasters_render_toasts(toasts, window, seq);
toasters_render_toasters(toasters, window, seq);
}
@@ -146,26 +146,26 @@ bool toasters_render_toasts (s_list **toasts, s_window_sdl2 *window,
assert(seq);
y = window->w * g_speed_y / g_speed_x - 210;
if (*toasts && (*toasts)->tag.type == TAG_MAP) {
- t = &(*toasts)->tag.data.map.values[0].data.list;
- y = (*toasts)->tag.data.map.values[1].data.f64;
+ t = &(*toasts)->tag.data.map.value[0].data.list;
+ y = (*toasts)->tag.data.map.value[1].data.f64;
}
while (y < window->h - 100) {
y += 170.0;
*toasts = list_new_map(2, *toasts);
map = &(*toasts)->tag.data.map;
- tag_init_sym_1(map->keys + 0, "toasts");
- tag_init_list(map->values + 0, NULL);
- tag_init_sym_1(map->keys + 1, "y");
- tag_init_f64(map->values + 1, y);
+ tag_init_sym_1(map->key + 0, "toasts");
+ tag_init_list(map->value + 0, NULL);
+ tag_init_sym_1(map->key + 1, "y");
+ tag_init_f64(map->value + 1, y);
}
i = *toasts;
while (i) {
if (i->tag.type == TAG_MAP) {
- t = &i->tag.data.map.values[0].data.list;
- y = i->tag.data.map.values[1].data.f64;
+ t = &i->tag.data.map.value[0].data.list;
+ y = i->tag.data.map.value[1].data.f64;
x = 0.0;
if (*t && (*t)->tag.type == TAG_MAP)
- x = (*t)->tag.data.map.values[0].data.f64;
+ x = (*t)->tag.data.map.value[0].data.f64;
if (x < window->w - 160.0) {
*t = list_new(*t);
toast_init(&(*t)->tag, window->w, y);
@@ -197,26 +197,26 @@ bool toasters_render_toasters (s_list **toasters, s_window_sdl2 *window,
/* io_inspect_list((const s_list **) toasters); */
y = -100.0;
if (*toasters && (*toasters)->tag.type == TAG_MAP) {
- t = &(*toasters)->tag.data.map.values[0].data.list;
- y = (*toasters)->tag.data.map.values[1].data.f64;
+ t = &(*toasters)->tag.data.map.value[0].data.list;
+ y = (*toasters)->tag.data.map.value[1].data.f64;
}
while (y < window->h - window->w * g_speed_y / g_speed_x) {
y += 170.0;
*toasters = list_new_map(2, *toasters);
map = &(*toasters)->tag.data.map;
- tag_init_sym_1(map->keys + 0, "toasters");
- tag_init_list(map->values + 0, NULL);
- tag_init_sym_1(map->keys + 1, "y");
- tag_init_f64(map->values + 1, y);
+ tag_init_sym_1(map->key + 0, "toasters");
+ tag_init_list(map->value + 0, NULL);
+ tag_init_sym_1(map->key + 1, "y");
+ tag_init_f64(map->value + 1, y);
}
i = *toasters;
while (i) {
if (i->tag.type == TAG_MAP) {
- t = &i->tag.data.map.values[0].data.list;
- y = i->tag.data.map.values[1].data.f64;
+ t = &i->tag.data.map.value[0].data.list;
+ y = i->tag.data.map.value[1].data.f64;
x = 1000.0;
if (*t && (*t)->tag.type == TAG_MAP)
- x = (*t)->tag.data.map.values[0].data.f64;
+ x = (*t)->tag.data.map.value[0].data.f64;
if (x > 60.0) {
*t = list_new(*t);
toaster_init(&(*t)->tag, y);
diff --git a/libc3/window/sdl2/demo/window_sdl2_demo.c b/libc3/window/sdl2/demo/window_sdl2_demo.c
index 4487120..0bfb7a0 100644
--- a/libc3/window/sdl2/demo/window_sdl2_demo.c
+++ b/libc3/window/sdl2/demo/window_sdl2_demo.c
@@ -21,8 +21,9 @@
#include "lightspeed.h"
#include "toasters.h"
#include "flies.h"
+#include "earth.h"
-#define WINDOW_SDL2_DEMO_SEQUENCE_COUNT 4
+#define WINDOW_SDL2_DEMO_SEQUENCE_COUNT 5
//s_sdl2_font g_font_computer_modern;
s_sdl2_font g_font_courier_new = {0};
@@ -154,6 +155,9 @@ bool window_sdl2_demo_load (s_window_sdl2 *window)
window_sdl2_sequence_init(window->sequence + 3, 60.0,
"04. Flies",
flies_load, flies_render);
+ window_sdl2_sequence_init(window->sequence + 4, 60.0,
+ "05. Earth",
+ earth_load, earth_render);
window_set_sequence_pos((s_window *) window, 0);
return true;
}
diff --git a/libc3/window/sdl2/gl.c b/libc3/window/sdl2/gl.c
new file mode 100644
index 0000000..258af60
--- /dev/null
+++ b/libc3/window/sdl2/gl.c
@@ -0,0 +1,18 @@
+/* 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 "gl.h"
+
+void gl_vertex_3d (const s_gl_3d *p)
+{
+ glVertex3dv(&p->x);
+}
diff --git a/libc3/window/sdl2/gl.h b/libc3/window/sdl2/gl.h
new file mode 100644
index 0000000..66db000
--- /dev/null
+++ b/libc3/window/sdl2/gl.h
@@ -0,0 +1,21 @@
+/* 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_WINDOW_SDL2_GL_H
+#define LIBC3_WINDOW_SDL2_GL_H
+
+#include "types.h"
+
+void gl_tex_coord_2d (const s_gl_2d *p);
+void gl_vertex_3d (const s_gl_3d *p);
+
+#endif /* LIBC3_WINDOW_SDL2_GL_H */
diff --git a/libc3/window/sdl2/gl_camera.c b/libc3/window/sdl2/gl_camera.c
new file mode 100644
index 0000000..a63fdea
--- /dev/null
+++ b/libc3/window/sdl2/gl_camera.c
@@ -0,0 +1,73 @@
+/* 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 <math.h>
+#include <libc3/c3.h>
+#include "gl_camera.h"
+
+s_gl_camera * gl_camera_init (s_gl_camera *camera, uw w, uw h)
+{
+ assert(camera);
+ assert(window);
+ assert(window->w);
+ assert(window->h);
+ camera->position.x = 0.0;
+ camera->position.y = 0.0;
+ camera->position.z = -10.0;
+ camera->fov_y = 90.0;
+ camera->clip_z_far = 1000;
+ camera->clip_z_near = 0.1;
+ gl_camera_set_aspect_ratio(camera, w, h);
+ return camera;
+}
+
+void gl_camera_delete (s_gl_camera *camera)
+{
+ free(camera);
+}
+
+s_gl_camera * gl_camera_new (uw w, uw h)
+{
+ s_gl_camera *camera;
+ camera = calloc(1, sizeof(s_gl_camera));
+ if (! camera) {
+ warn("gl_camera_new: camera");
+ return NULL;
+ }
+ if (! gl_camera_init(camera, w, h)) {
+ free(camera);
+ return NULL;
+ }
+ return camera;
+}
+
+void gl_camera_render (const s_gl_camera *camera)
+{
+ assert(camera);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ gluPerspective(camera->fov_y, camera->aspect_ratio,
+ camera->clip_z_near, camera->clip_z_far);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glTranslated(-camera->position.x, -camera->position.y,
+ -camera->position.z);
+}
+
+s_gl_camera * gl_camera_set_aspect_ratio (s_gl_camera *camera, uw w,
+ uw h)
+{
+ assert(camera);
+ camera->aspect_ratio = (f64) (w ? w : 1) / (h ? h : 1);
+ return camera;
+}
diff --git a/libc3/window/sdl2/gl_camera.h b/libc3/window/sdl2/gl_camera.h
new file mode 100644
index 0000000..70a4a2c
--- /dev/null
+++ b/libc3/window/sdl2/gl_camera.h
@@ -0,0 +1,34 @@
+/* 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 GL_CAMERA_H
+#define GL_CAMERA_H
+
+#include "types.h"
+
+/* Stack-allocation compatible functions, call gl_camera_clean after
+ use. */
+//void gl_camera_clean (s_gl_camera *camera);
+s_gl_camera * gl_camera_init (s_gl_camera *camera, uw w, uw h);
+
+/* Heap-allocation functions, call gl_camera_delete after use. */
+void gl_camera_delete (s_gl_camera *camera);
+s_gl_camera * gl_camera_new (uw w, uw h);
+
+/* Operators. */
+s_gl_camera * gl_camera_set_aspect_ratio (s_gl_camera *camera, uw w,
+ uw h);
+
+/* Observers. */
+void gl_camera_render (const s_gl_camera *camera);
+
+#endif /* GL_CAMERA_H */
diff --git a/libc3/window/sdl2/gl_cylinder.c b/libc3/window/sdl2/gl_cylinder.c
new file mode 100644
index 0000000..44e5dbe
--- /dev/null
+++ b/libc3/window/sdl2/gl_cylinder.c
@@ -0,0 +1,77 @@
+/* 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 <math.h>
+#include <libc3/c3.h>
+#include "gl.h"
+#include "gl_cylinder.h"
+
+s_gl_cylinder * gl_cylinder_init (s_gl_cylinder *cylinder,
+ uw segments_u, uw segments_v)
+{
+ f64 angle;
+ uw i;
+ uw j;
+ s_gl_3d *p;
+ assert(cylinder);
+ assert(segments_u);
+ assert(segments_v);
+ cylinder->segments_u = segments_u;
+ cylinder->segments_v = segments_v;
+ p = calloc(segments_u * segments_v + 2,
+ sizeof(s_gl_3d));
+ if (! p) {
+ warn("gl_cylinder_init(%lu, %lu): point array", segments_u,
+ segments_v);
+ return NULL;
+ }
+ cylinder->vertex = p;
+ i = 0;
+ while (i < segments_v) {
+ j = 0;
+ while (j < segments_u) {
+ angle = (f64) j / segments_u * M_PI * 2.0;
+ p->x = cos(angle);
+ p->y = sin(angle);
+ p->z = i / segments_v;
+ p++;
+ j++;
+ }
+ i++;
+ }
+ return cylinder;
+}
+
+void gl_cylinder_render (const s_gl_cylinder *cylinder)
+{
+ uw i;
+ uw j;
+ s_gl_3d *p;
+ assert(cylinder);
+ glBegin(GL_POINTS);
+ p = cylinder->vertex;
+ i = 0;
+ while (i < cylinder->segments_v) {
+ j = 0;
+ while (j < cylinder->segments_u) {
+ gl_vertex_3d(p);
+ p++;
+ j++;
+ }
+ i++;
+ }
+ gl_vertex_3d(p);
+ p++;
+ gl_vertex_3d(p);
+ glEnd();
+}
diff --git a/libc3/window/sdl2/gl_cylinder.h b/libc3/window/sdl2/gl_cylinder.h
new file mode 100644
index 0000000..0fe5e72
--- /dev/null
+++ b/libc3/window/sdl2/gl_cylinder.h
@@ -0,0 +1,22 @@
+/* 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 GL_CYLINDER_H
+#define GL_CYLINDER_H
+
+#include "types.h"
+
+s_gl_cylinder * gl_cylinder_init (s_gl_cylinder *cylinder,
+ uw segments_u, uw segments_v);
+void gl_cylinder_render (const s_gl_cylinder *cylinder);
+
+#endif /* GL_CYLINDER_H */
diff --git a/libc3/window/sdl2/gl_sphere.c b/libc3/window/sdl2/gl_sphere.c
new file mode 100644
index 0000000..7ffdfde
--- /dev/null
+++ b/libc3/window/sdl2/gl_sphere.c
@@ -0,0 +1,106 @@
+/* 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 <math.h>
+#include <libc3/c3.h>
+#include "gl.h"
+#include "gl_sphere.h"
+
+void gl_sphere_clean (s_gl_sphere *sphere)
+{
+ assert(sphere);
+ free(sphere->vertex);
+}
+
+void gl_sphere_delete (s_gl_sphere *sphere)
+{
+ assert(sphere);
+ gl_sphere_clean(sphere);
+ free(sphere);
+}
+
+s_gl_sphere * gl_sphere_init (s_gl_sphere *sphere, uw segments)
+{
+ f64 angle_i;
+ f64 angle_j;
+ uw i;
+ uw j;
+ s_gl_3d *p;
+ f64 r;
+ f64 z;
+ assert(s);
+ if (! segments)
+ segments = 10;
+ sphere->segments = segments;
+ p = calloc(segments * segments, sizeof(s_gl_3d));
+ if (! p) {
+ warn("gl_sphere_init(%lu): point array", segments);
+ return NULL;
+ }
+ sphere->vertex = p;
+ i = 0;
+ while (i < segments) {
+ angle_i = (f64) i / segments * M_PI * 2.0;
+ r = cos(angle_i);
+ z = sin(angle_i);
+ j = 0;
+ while (j < segments) {
+ angle_j = (f64) j / segments * M_PI * 2.0;
+ p->x = cos(angle_j) * r;
+ p->y = sin(angle_j) * r;
+ p->z = z;
+ p++;
+ j++;
+ }
+ i++;
+ }
+ return sphere;
+}
+
+s_gl_sphere * gl_sphere_new (uw segments)
+{
+ s_gl_sphere *sphere;
+ sphere = calloc(1, sizeof(s_gl_sphere));
+ if (! sphere) {
+ warn("gl_sphere_new: sphere");
+ return NULL;
+ }
+ if (! gl_sphere_init(sphere, segments)) {
+ free(sphere);
+ return NULL;
+ }
+ return sphere;
+}
+
+void gl_sphere_render (const s_gl_sphere *sphere)
+{
+ uw i;
+ uw j;
+ s_gl_3d *p;
+ uw seg;
+ assert(sphere);
+ seg = sphere->segments;
+ glBegin(GL_POINTS);
+ p = sphere->vertex;
+ i = 0;
+ while (i < seg) {
+ j = 0;
+ while (j < seg) {
+ gl_vertex_3d(p);
+ p++;
+ j++;
+ }
+ i++;
+ }
+ glEnd();
+}
diff --git a/libc3/window/sdl2/gl_sphere.h b/libc3/window/sdl2/gl_sphere.h
new file mode 100644
index 0000000..b68eed1
--- /dev/null
+++ b/libc3/window/sdl2/gl_sphere.h
@@ -0,0 +1,30 @@
+/* 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 GL_SPHERE_H
+#define GL_SPHERE_H
+
+#include "types.h"
+
+/* Stack-allocation compatible functions, call gl_sphere_clean after
+ use. */
+void gl_sphere_clean (s_gl_sphere *sphere);
+s_gl_sphere * gl_sphere_init (s_gl_sphere *sphere, uw segments);
+
+/* Heap-allocation functions, call gl_sphere_delete after use. */
+void gl_sphere_delete (s_gl_sphere *sphere);
+s_gl_sphere * gl_sphere_new (uw segments);
+
+/* Observers. */
+void gl_sphere_render (const s_gl_sphere *sphere);
+
+#endif /* GL_SPHERE_H */
diff --git a/libc3/window/sdl2/sdl2_sprite.c b/libc3/window/sdl2/sdl2_sprite.c
index c7a7d41..76e7aa3 100644
--- a/libc3/window/sdl2/sdl2_sprite.c
+++ b/libc3/window/sdl2/sdl2_sprite.c
@@ -16,6 +16,14 @@
#include <libc3/c3.h>
#include "sdl2_sprite.h"
+void sdl2_sprite_bind (const s_sdl2_sprite *sprite, uw frame)
+{
+ assert(sprite);
+ assert(frame < sprite->frame_count);
+ frame %= sprite->frame_count;
+ glBindTexture(GL_TEXTURE_2D, sprite->texture[frame]);
+}
+
void sdl2_sprite_clean (s_sdl2_sprite *sprite)
{
assert(sprite);
@@ -285,8 +293,7 @@ s_sdl2_sprite * sdl2_sprite_init (s_sdl2_sprite *sprite,
return sprite;
}
-void sdl2_sprite_render (const s_sdl2_sprite *sprite,
- uw frame)
+void sdl2_sprite_render (const s_sdl2_sprite *sprite, uw frame)
{
assert(sprite);
assert(frame < sprite->frame_count);
diff --git a/libc3/window/sdl2/sdl2_sprite.h b/libc3/window/sdl2/sdl2_sprite.h
index 10567e9..675992d 100644
--- a/libc3/window/sdl2/sdl2_sprite.h
+++ b/libc3/window/sdl2/sdl2_sprite.h
@@ -23,6 +23,7 @@ s_sdl2_sprite * sdl2_sprite_init (s_sdl2_sprite *sprite,
uw frame_count);
/* operations */
+void sdl2_sprite_bind (const s_sdl2_sprite *sprite, uw frame);
void sdl2_sprite_render (const s_sdl2_sprite *sprite, uw frame);
#endif /* CAIRO_SPRITE_H */
diff --git a/libc3/window/sdl2/sources.mk b/libc3/window/sdl2/sources.mk
index 2108db7..6b262d8 100644
--- a/libc3/window/sdl2/sources.mk
+++ b/libc3/window/sdl2/sources.mk
@@ -1,11 +1,19 @@
# sources.mk generated by update_sources
HEADERS = \
+ gl.h \
+ gl_camera.h \
+ gl_cylinder.h \
+ gl_sphere.h \
sdl2_font.h \
sdl2_sprite.h \
types.h \
window_sdl2.h \
SOURCES = \
+ gl.c \
+ gl_camera.c \
+ gl_cylinder.c \
+ gl_sphere.c \
sdl2_font.c \
sdl2_sprite.c \
window_sdl2.c \
diff --git a/libc3/window/sdl2/sources.sh b/libc3/window/sdl2/sources.sh
index 8fb7b15..8a15de9 100644
--- a/libc3/window/sdl2/sources.sh
+++ b/libc3/window/sdl2/sources.sh
@@ -1,3 +1,3 @@
# sources.sh generated by update_sources
-HEADERS='sdl2_font.h sdl2_sprite.h types.h window_sdl2.h '
-SOURCES='sdl2_font.c sdl2_sprite.c window_sdl2.c '
+HEADERS='gl.h gl_camera.h gl_cylinder.h gl_sphere.h sdl2_font.h sdl2_sprite.h types.h window_sdl2.h '
+SOURCES='gl.c gl_camera.c gl_cylinder.c gl_sphere.c sdl2_font.c sdl2_sprite.c window_sdl2.c '
diff --git a/libc3/window/sdl2/types.h b/libc3/window/sdl2/types.h
index 6863538..3b39dfb 100644
--- a/libc3/window/sdl2/types.h
+++ b/libc3/window/sdl2/types.h
@@ -31,6 +31,11 @@
#include <libc3/types.h>
#include "../types.h"
+typedef struct gl_2d s_gl_2d;
+typedef struct gl_3d s_gl_3d;
+typedef struct gl_camera s_gl_camera;
+typedef struct gl_cylinder s_gl_cylinder;
+typedef struct gl_sphere s_gl_sphere;
typedef struct sdl2_font s_sdl2_font;
typedef struct sdl2_sprite s_sdl2_sprite;
typedef struct rgb s_rgb;
@@ -67,6 +72,37 @@ typedef bool (*f_window_sdl2_sequence_render) (s_sequence *seq,
s_window_sdl2 *window,
void *context);
+/* 1 */
+struct gl_cylinder {
+ uw segments_u;
+ uw segments_v;
+ s_gl_3d *vertex;
+};
+
+struct gl_3d {
+ f64 x;
+ f64 y;
+ f64 z;
+};
+
+struct gl_sphere {
+ uw segments;
+ s_gl_3d *vertex;
+};
+
+struct rgb {
+ double r;
+ double g;
+ double b;
+};
+
+struct rgba {
+ double r;
+ double g;
+ double b;
+ double a;
+};
+
struct sdl2_font {
FTGLfont *ftgl_font;
u32 size;
@@ -90,19 +126,6 @@ struct sdl2_sprite {
GLuint *texture;
};
-struct rgb {
- double r;
- double g;
- double b;
-};
-
-struct rgba {
- double r;
- double g;
- double b;
- double a;
-};
-
/* Subtype of s_window. See libc3/window/types.h */
struct window_sdl2 {
sw x;
@@ -128,4 +151,14 @@ struct window_sdl2 {
float dpi_h;
};
+/* 2 */
+struct gl_camera {
+ f64 aspect_ratio;
+ f64 clip_z_far;
+ f64 clip_z_near;
+ f64 fov_y;
+ s_gl_3d position;
+ s_gl_3d rotation;
+};
+
#endif /* LIBC3_WINDOW_SDL2_TYPES_H */
diff --git a/sources.mk b/sources.mk
index e80551a..e505fa6 100644
--- a/sources.mk
+++ b/sources.mk
@@ -7,31 +7,31 @@ C3_CONFIGURES = \
ic3/update_sources \
libc3/configure \
libc3/update_sources \
+ libc3/window/configure \
+ libc3/window/update_sources \
+ libc3/window/cairo/demo/configure \
+ libc3/window/cairo/demo/update_sources \
+ libc3/window/cairo/xcb/demo/configure \
+ libc3/window/cairo/xcb/demo/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/cairo/configure \
- libc3/window/cairo/quartz/configure \
- libc3/window/cairo/quartz/update_sources \
+ libc3/window/cairo/update_sources \
libc3/window/cairo/quartz/demo/configure \
libc3/window/cairo/quartz/demo/update_sources \
- libc3/window/cairo/demo/configure \
- libc3/window/cairo/demo/update_sources \
- libc3/window/cairo/update_sources \
- libc3/window/cairo/win32/configure \
+ libc3/window/cairo/quartz/configure \
+ libc3/window/cairo/quartz/update_sources \
libc3/window/cairo/win32/demo/configure \
libc3/window/cairo/win32/demo/update_sources \
+ libc3/window/cairo/win32/configure \
libc3/window/cairo/win32/update_sources \
- libc3/window/configure \
- libc3/window/update_sources \
- libc3/window/sdl2/configure \
- libc3/window/sdl2/demo/configure \
libc3/window/sdl2/demo/macos/configure \
+ libc3/window/sdl2/demo/configure \
libc3/window/sdl2/demo/update_sources \
+ libc3/window/sdl2/configure \
libc3/window/sdl2/update_sources \
- libtommath/update_sources \
libtommath/configure \
+ libtommath/update_sources \
test/configure \
test/update_sources \
ucd2c/configure \
@@ -40,20 +40,20 @@ C3_MAKEFILES = \
c3c/Makefile \
c3s/Makefile \
ic3/Makefile \
- libc3/gen.mk \
libc3/Makefile \
- libc3/window/cairo/xcb/Makefile \
+ libc3/gen.mk \
+ libc3/window/Makefile \
+ libc3/window/cairo/demo/Makefile \
libc3/window/cairo/xcb/demo/Makefile \
+ libc3/window/cairo/xcb/Makefile \
libc3/window/cairo/Makefile \
- libc3/window/cairo/quartz/Makefile \
libc3/window/cairo/quartz/demo/Makefile \
- libc3/window/cairo/demo/Makefile \
- libc3/window/cairo/win32/Makefile \
+ libc3/window/cairo/quartz/Makefile \
libc3/window/cairo/win32/demo/Makefile \
- libc3/window/Makefile \
- libc3/window/sdl2/Makefile \
- libc3/window/sdl2/demo/Makefile \
+ libc3/window/cairo/win32/Makefile \
libc3/window/sdl2/demo/macos/Makefile \
+ libc3/window/sdl2/demo/Makefile \
+ libc3/window/sdl2/Makefile \
libtommath/Makefile \
test/Makefile \
ucd2c/Makefile \
@@ -63,413 +63,434 @@ C3_C_SOURCES = \
c3s/buf_readline.c \
c3s/c3s.c \
c3s/buf_readline.h \
- ic3/ic3.c \
- ic3/buf_linenoise.c \
ic3/buf_linenoise.h \
+ ic3/ic3.c \
ic3/linenoise.c \
- libc3/struct.c \
- libc3/abs.c \
- libc3/buf.c \
- libc3/set__tag.h \
- libc3/set__tag.c \
- libc3/set_item__tag.c \
- libc3/set_item__tag.h \
- libc3/set_cursor__tag.c \
- libc3/set_cursor__tag.h \
- libc3/skiplist_node__fact.c \
+ ic3/buf_linenoise.c \
+ libc3/buf_inspect_s_base.c.in \
+ libc3/type.h \
+ libc3/fact.c \
+ libc3/time.h \
+ libc3/fn.h \
+ libc3/s16.h \
+ libc3/buf_inspect_s8_octal.h \
+ libc3/log.c \
+ libc3/error.h \
+ libc3/buf_inspect_u64_octal.h \
+ libc3/set_item.h.in \
+ libc3/compare.c \
+ libc3/buf_inspect_s8_binary.h \
+ libc3/buf_inspect_uw_hexadecimal.h \
+ libc3/uw.c \
+ libc3/eval.c \
+ libc3/set__fact.c \
+ libc3/sym.h \
+ libc3/env.h \
+ libc3/cfn.c \
+ libc3/buf_inspect_u16_octal.h \
+ libc3/u.h.in \
+ libc3/buf_parse_s16.c \
+ libc3/s8.h \
+ libc3/quote.h \
+ libc3/buf_inspect_s32.h \
+ libc3/buf_inspect.c \
+ libc3/buf_parse_u.h.in \
libc3/skiplist_node__fact.h \
libc3/skiplist__fact.c \
- libc3/skiplist__fact.h \
- libc3/set_item__fact.c \
- libc3/set_item__fact.h \
- libc3/call.c \
- libc3/buf_parse.c \
- libc3/arg.c \
+ libc3/tag_add.c \
+ libc3/buf_inspect_s32_hexadecimal.h \
+ libc3/ceiling.h \
+ libc3/struct_type.h \
+ libc3/list.c \
+ libc3/buf_inspect_u64.c \
+ libc3/facts.h \
+ libc3/tag_type.h \
+ libc3/buf_inspect_u16_decimal.c \
+ libc3/tag_sub.c \
+ libc3/facts_with_cursor.c \
+ libc3/buf_inspect_sw_decimal.c \
+ libc3/facts_cursor.c \
+ libc3/buf_inspect_u64_binary.h \
+ libc3/buf_inspect_sw_hexadecimal.h \
+ libc3/buf_inspect_s32_decimal.h \
+ libc3/u16.h \
+ libc3/buf_inspect_s64_octal.h \
+ libc3/buf_inspect_u8_binary.h \
+ libc3/buf_inspect_s8.h \
+ libc3/buf_inspect_s16_octal.h \
+ libc3/ucd.c \
+ libc3/buf_inspect_s16_binary.h \
+ libc3/tuple.c \
+ libc3/buf_inspect_uw_octal.h \
+ libc3/buf_parse_u8.c \
+ libc3/tag.h \
+ libc3/float.h \
+ libc3/buf_inspect_u_base.c.in \
+ libc3/buf_parse_u16.c \
+ libc3/buf_inspect_u16_hexadecimal.h \
+ libc3/buf_inspect_s8_decimal.c \
+ libc3/buf_inspect_u32.h \
libc3/array.c \
- libc3/binding.c \
- libc3/c3.c \
- libc3/set__fact.h \
- libc3/set_cursor__fact.c \
- libc3/set__fact.c \
- libc3/uw.h \
- libc3/set_cursor__fact.h \
- libc3/uw.c \
- libc3/sw.h \
- libc3/sw.c \
- libc3/buf_parse_uw.h \
- libc3/buf_parse_uw.c \
- libc3/buf_parse_sw.c \
libc3/buf_parse_sw.h \
- libc3/buf_inspect_uw_hexadecimal.h \
- libc3/buf_inspect_uw_hexadecimal.c \
- libc3/buf_inspect_uw_decimal.h \
- libc3/buf_inspect_uw_decimal.c \
- libc3/u64.c \
- libc3/list_init.c \
- libc3/bool.c \
- libc3/bool.h \
- libc3/buf_file.c \
- libc3/buf_inspect_uw_octal.h \
- libc3/buf_inspect_uw_binary.h \
- libc3/buf_inspect_uw_octal.c \
- libc3/buf_inspect_uw_binary.c \
- libc3/buf_inspect_uw.h \
+ libc3/set.h.in \
+ libc3/s.c.in \
+ libc3/buf_parse_s.c.in \
+ libc3/map.h \
+ libc3/skiplist.h.in \
+ libc3/set__tag.h \
+ libc3/buf_inspect_s64.c \
+ libc3/io.c \
+ libc3/set_item__tag.c \
+ libc3/sequence.c \
+ libc3/types.h \
libc3/buf_inspect_uw.c \
- libc3/buf_inspect_sw_hexadecimal.h \
- libc3/buf_inspect_sw_hexadecimal.c \
- libc3/buf_inspect_sw_decimal.h \
- libc3/buf_inspect_sw_decimal.c \
- libc3/buf_inspect_sw_octal.c \
+ libc3/buf_inspect_u32_binary.c \
+ libc3/buf_inspect_s64_decimal.h \
+ libc3/set_cursor.c.in \
+ libc3/ident.c \
+ libc3/buf_inspect_s64_hexadecimal.c \
+ libc3/bool.h \
+ libc3/s.h.in \
+ libc3/set.c.in \
+ libc3/skiplist.c.in \
+ libc3/operator.h \
+ libc3/fn_clause.h \
+ libc3/buf_parse_s.h.in \
+ libc3/buf_inspect_s16.c \
+ libc3/binding.c \
+ libc3/ptag.h \
+ libc3/buf_parse_s32.h \
+ libc3/tag_bor.c \
+ libc3/var.h \
+ libc3/tag_shift_left.c \
+ libc3/set_item__fact.h \
+ libc3/ptr.c \
+ libc3/u8.c \
+ libc3/set_cursor.h.in \
+ libc3/f32.c \
libc3/buf_inspect_sw_octal.h \
- libc3/buf_inspect_sw_binary.h \
+ libc3/c3.h \
+ libc3/arg.h \
+ libc3/buf_inspect_u8_hexadecimal.c \
+ libc3/buf_inspect_u32_hexadecimal.h \
+ libc3/buf_parse_u64.c \
+ libc3/module.c \
+ libc3/frame.h \
+ libc3/buf_inspect_s16_decimal.c \
+ libc3/file.h \
+ libc3/sw.h \
+ libc3/s32.c \
+ libc3/error_handler.c \
+ libc3/str.c \
libc3/buf_parse.h \
- libc3/buf.h \
- libc3/buf_save.c \
+ libc3/buf_inspect_uw_binary.c \
+ libc3/buf_inspect_uw_decimal.h \
libc3/facts_spec_cursor.c \
- libc3/buf_inspect_sw.h \
- libc3/buf_inspect_sw_binary.c \
- libc3/buf_inspect_sw.c \
+ libc3/tag_init.c \
libc3/u64.h \
- libc3/s64.c \
- libc3/s64.h \
- libc3/buf_parse_u64.h \
- libc3/buf_parse_u64.c \
- libc3/buf_parse_s64.c \
- libc3/buf_parse_s64.h \
+ libc3/buf_inspect_u_base.h.in \
+ libc3/buf_inspect_s32_octal.h \
+ libc3/f64.h \
+ libc3/buf_inspect_u8_octal.h \
+ libc3/buf_inspect_s64_binary.c \
libc3/buf_inspect_u64_hexadecimal.c \
- libc3/buf_inspect_u64_decimal.h \
- libc3/buf_inspect_u64_hexadecimal.h \
- libc3/buf_inspect_u64_decimal.c \
- libc3/tag_init.h \
- libc3/buf_file.h \
+ libc3/buf_inspect_u16_binary.c \
libc3/buf_save.h \
+ libc3/buf_inspect_u16.c \
+ libc3/buf_inspect_s8_hexadecimal.c \
+ libc3/u.c.in \
+ libc3/buf_inspect_sw.h \
+ libc3/facts_with.c \
+ libc3/buf_parse_u.c.in \
+ libc3/buf_parse_u32.h \
+ libc3/set_cursor__fact.c \
+ libc3/buf.h \
+ libc3/set_cursor__tag.h \
+ libc3/buf_inspect_s16_hexadecimal.h \
+ libc3/buf_inspect_u32_decimal.h \
+ libc3/buf_parse_uw.c \
+ libc3/buf_parse_s64.c \
+ libc3/abs.h \
+ libc3/list_init.c \
+ libc3/buf_inspect_sw_binary.c \
+ libc3/buf_parse_s8.h \
libc3/call.h \
- libc3/buf_inspect_u64_octal.c \
- libc3/buf_inspect_u64_octal.h \
- libc3/buf_inspect_u64_binary.h \
- libc3/buf_inspect_u64_binary.c \
- libc3/buf_inspect_u64.h \
- libc3/buf_inspect_u64.c \
- libc3/buf_inspect_s64_hexadecimal.h \
- libc3/buf_inspect_s64_hexadecimal.c \
- libc3/buf_inspect_s64_decimal.c \
- libc3/buf_inspect_s64_decimal.h \
- libc3/buf_inspect_s64_octal.h \
- libc3/binding.h \
- libc3/sequence.c \
- libc3/io.c \
- libc3/ceiling.c \
- libc3/ceiling.h \
- libc3/cfn.c \
- libc3/cfn.h \
- libc3/character.c \
+ libc3/sign.c \
+ libc3/buf_inspect_u8_decimal.h \
libc3/character.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.h \
- libc3/u32.c \
- libc3/s32.h \
- libc3/buf_parse_u32.h \
- libc3/s32.c \
- libc3/buf_parse_u32.c \
- libc3/buf_parse_s32.h \
- libc3/buf_inspect_u32_hexadecimal.h \
- libc3/buf_parse_s32.c \
- libc3/buf_inspect_u32_hexadecimal.c \
- libc3/compare.c \
- libc3/buf_inspect.c \
- libc3/compare.h \
- libc3/buf_inspect_u32_decimal.c \
- libc3/buf_inspect_u32_decimal.h \
+ libc3/buf_inspect_u64_decimal.h \
+ libc3/buf_inspect_s_base.h.in \
libc3/buf_inspect_u32_octal.h \
- libc3/buf_inspect_u32_octal.c \
- libc3/buf_inspect_u32_binary.h \
- libc3/buf_inspect_u32_binary.c \
- libc3/buf_inspect_u32.h \
- libc3/buf_inspect_u32.c \
- libc3/buf_inspect_s32_hexadecimal.h \
- libc3/buf_inspect_s32_hexadecimal.c \
- libc3/buf_inspect_s32.h \
- libc3/error.c \
- libc3/error.h \
- libc3/error_handler.c \
- libc3/eval.h \
- libc3/eval.c \
- libc3/facts.h \
- libc3/buf_inspect_s32_decimal.h \
- libc3/buf_inspect_s32_decimal.c \
- libc3/buf_inspect_s32_octal.h \
- libc3/buf_inspect_s32_binary.c \
+ libc3/u32.c \
+ libc3/hash.c \
+ libc3/buf_file.h \
+ libc3/struct.h \
+ libc3/integer.c \
+ libc3/buf_inspect_u8.c \
+ libc3/facts_spec.c \
libc3/buf_inspect_s32_binary.h \
- libc3/buf_inspect_s32_octal.c \
- libc3/buf_inspect_s32.c \
- libc3/u16.h \
- libc3/u16.c \
- libc3/s16.h \
- libc3/buf_parse_u16.h \
- libc3/s16.c \
- libc3/buf_parse_u16.c \
- libc3/buf_parse_s16.h \
- libc3/u8.h \
- libc3/list_init.h \
- libc3/fact.c \
- libc3/fact.h \
- libc3/facts_cursor.c \
- libc3/buf_inspect_u16_hexadecimal.h \
- libc3/buf_parse_s16.c \
+ libc3/set_item.c.in \
+ libc3/tag_bxor.c \
+ libc3/s64.h \
libc3/buf_inspect_u16_decimal.h \
- libc3/buf_inspect_u16_hexadecimal.c \
- 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_s16_hexadecimal.h \
- libc3/buf_inspect_u16.c \
- libc3/buf_inspect_s16_octal.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.c \
- libc3/buf_inspect_s16_decimal.h \
- libc3/buf_inspect_s16_octal.c \
- libc3/buf_inspect_s16_binary.c \
- libc3/buf_inspect_s16_binary.h \
- libc3/buf_inspect_s16.h \
- libc3/buf_inspect_s16.c \
- libc3/s8.h \
- libc3/u8.c \
- libc3/s8.c \
- libc3/buf_parse_u8.h \
- libc3/buf_parse_u8.c \
- libc3/buf_parse_u.h.in \
- libc3/facts_with.c \
- libc3/facts_with.h \
- libc3/facts_with_cursor.c \
- libc3/buf_parse_s8.h \
- libc3/buf_parse_s8.c \
- libc3/buf_inspect_u8_hexadecimal.h \
- 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.c \
- libc3/buf_inspect_u8_binary.h \
- libc3/buf_inspect_u8.c \
- libc3/buf_inspect_u8.h \
- libc3/buf_inspect_s8_hexadecimal.h \
+ libc3/tag_type.c \
+ libc3/facts.c \
+ libc3/buf_inspect_u64.h \
+ libc3/buf_inspect_sw_decimal.h \
libc3/facts_with_cursor.h \
- libc3/float.h \
- libc3/frame.c \
- libc3/frame.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.c \
- libc3/buf_inspect_s8_binary.h \
- libc3/buf_inspect_s8.c \
- libc3/buf_inspect_s8.h \
- libc3/file.c \
- libc3/hash.h \
- libc3/ident.h \
- libc3/integer.c \
- libc3/integer.h \
- libc3/list.h \
- libc3/log.c \
- libc3/log.h \
- libc3/buf_inspect_s.h.in \
- libc3/module.c \
+ libc3/skiplist_node__fact.c \
libc3/buf_inspect.h \
- libc3/c3_main.h \
- libc3/map.c \
- libc3/abs.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/sequence.h \
- libc3/tag_mul.c \
- libc3/tag_sub.c \
- libc3/set_cursor.c.in \
- libc3/set_cursor.h.in \
- libc3/f32.h \
- libc3/facts.c \
- libc3/set_item.c.in \
- libc3/set_item.h.in \
- libc3/sym.c \
- libc3/s.h.in \
- libc3/sign.c \
- libc3/sign.h \
- libc3/skiplist.c.in \
- libc3/skiplist.h.in \
- libc3/type.h \
- libc3/tag.c \
- libc3/skiplist_node.c.in \
+ libc3/buf_inspect_s32.c \
libc3/skiplist_node.h.in \
- libc3/str.h \
- libc3/tag_div.c \
- libc3/tuple.c \
- libc3/ucd.c \
- libc3/sym.h \
- 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/tag.h \
+ libc3/s8.c \
+ libc3/buf_parse_s16.h \
+ libc3/list.h \
+ libc3/struct_type.c \
+ libc3/ceiling.c \
+ libc3/buf_inspect_s.h.in \
+ libc3/buf_inspect_s32_hexadecimal.c \
+ libc3/skiplist__fact.h \
+ libc3/uw.h \
+ libc3/buf_inspect_uw_hexadecimal.c \
+ libc3/buf_inspect_s8_binary.c \
+ libc3/tag_mod.c \
+ libc3/compare.h \
+ libc3/buf_inspect_u64_octal.c \
+ libc3/buf_inspect_u16_octal.c \
+ libc3/tag_band.c \
+ libc3/cfn.h \
libc3/env.c \
- libc3/error_handler.h \
- libc3/ident.c \
+ libc3/set__fact.h \
+ libc3/sym.c \
+ libc3/eval.h \
+ libc3/c3_main.h \
+ libc3/buf_inspect_s8_octal.c \
+ libc3/s16.c \
libc3/fn.c \
- libc3/tag_bor.c \
- libc3/tag_bxor.c \
- libc3/buf_inspect_s_base.c.in \
- libc3/buf_inspect_u.c.in \
- libc3/buf_inspect_u.h.in \
- libc3/env.h \
- libc3/arg.h \
- libc3/buf_inspect_u_base.c.in \
- libc3/buf_inspect_u_base.h.in \
- libc3/window/cairo/xcb/config.h \
- libc3/window/cairo/xcb/window_cairo_xcb.c \
+ libc3/time.c \
+ libc3/fact.h \
+ libc3/type.c \
+ libc3/error.c \
+ libc3/log.h \
+ libc3/sequence.h \
+ libc3/set_item__tag.h \
+ libc3/io.h \
+ libc3/buf_inspect_s64.h \
+ libc3/buf_inspect_s64_hexadecimal.h \
+ libc3/window/types.h \
+ libc3/window/window.h \
+ libc3/window/cairo/demo/toasters.h \
+ libc3/window/cairo/demo/window_cairo_demo.c \
+ libc3/window/cairo/demo/lightspeed.h \
+ libc3/window/cairo/demo/flies.h \
+ libc3/window/cairo/demo/bg_rect.h \
+ libc3/window/cairo/demo/window_cairo_demo.h \
+ libc3/window/cairo/demo/toasters.c \
+ libc3/window/cairo/demo/lightspeed.c \
+ libc3/window/cairo/demo/flies.c \
+ libc3/window/cairo/demo/bg_rect.c \
libc3/window/cairo/xcb/demo/window_cairo_xcb_demo.c \
libc3/window/cairo/xcb/window_cairo_xcb.h \
+ libc3/window/cairo/xcb/config.h \
+ libc3/window/cairo/xcb/window_cairo_xcb.c \
libc3/window/cairo/types.h \
- libc3/window/cairo/window_cairo.h \
libc3/window/cairo/window_cairo.c \
- libc3/window/cairo/quartz/window_cairo_quartz.h \
+ libc3/window/cairo/cairo_font.h \
+ libc3/window/cairo/cairo_sprite.h \
libc3/window/cairo/quartz/demo/window_cairo_quartz_demo.c \
- libc3/window/cairo/quartz/window_cairo_quartz_app_delegate.h \
- libc3/window/cairo/quartz/xkbquartz.h \
- libc3/window/cairo/quartz/window_cairo_quartz_view.h \
libc3/window/cairo/quartz/window_cairo_quartz_view_controller.h \
libc3/window/cairo/quartz/quartz_to_xkbcommon.c \
+ libc3/window/cairo/quartz/window_cairo_quartz.h \
+ libc3/window/cairo/quartz/window_cairo_quartz_app_delegate.h \
libc3/window/cairo/quartz/quartz_to_xkbcommon.h \
- libc3/window/cairo/demo/bg_rect.c \
- libc3/window/cairo/demo/bg_rect.h \
- libc3/window/cairo/demo/lightspeed.c \
- libc3/window/cairo/demo/lightspeed.h \
- libc3/window/cairo/demo/window_cairo_demo.c \
- libc3/window/cairo/demo/window_cairo_demo.h \
- libc3/window/cairo/demo/toasters.c \
- libc3/window/cairo/demo/flies.c \
- libc3/window/cairo/demo/toasters.h \
- libc3/window/cairo/demo/flies.h \
- libc3/window/cairo/cairo_png.c \
+ libc3/window/cairo/quartz/xkbquartz.h \
+ libc3/window/cairo/quartz/window_cairo_quartz_view.h \
+ libc3/window/cairo/window_cairo.h \
+ libc3/window/cairo/cairo_font.c \
libc3/window/cairo/win32/demo/window_cairo_win32_demo.c \
libc3/window/cairo/win32/vk_to_xkbcommon.c \
+ libc3/window/cairo/win32/window_cairo_win32.h \
libc3/window/cairo/win32/vk_to_xkbcommon.h \
libc3/window/cairo/win32/window_cairo_win32.c \
- libc3/window/cairo/win32/window_cairo_win32.h \
- libc3/window/cairo/cairo_png.h \
libc3/window/cairo/cairo_sprite.c \
- libc3/window/cairo/cairo_sprite.h \
- libc3/window/cairo/cairo_font.c \
- libc3/window/cairo/cairo_font.h \
- libc3/window/types.h \
- libc3/window/window.c \
- libc3/window/window.h \
- libc3/window/sdl2/demo/bg_rect.c \
- libc3/window/sdl2/demo/bg_rect.h \
+ libc3/window/sdl2/demo/toasters.h \
+ libc3/window/sdl2/demo/earth.h \
+ libc3/window/sdl2/demo/lightspeed.h \
+ libc3/window/sdl2/demo/flies.h \
libc3/window/sdl2/demo/window_sdl2_demo.c \
- libc3/window/sdl2/types.h \
+ libc3/window/sdl2/demo/bg_rect.h \
+ libc3/window/sdl2/demo/toasters.c \
+ libc3/window/sdl2/demo/earth.c \
+ libc3/window/sdl2/demo/lightspeed.c \
+ libc3/window/sdl2/demo/flies.c \
+ libc3/window/sdl2/demo/bg_rect.c \
+ libc3/window/sdl2/demo/window_sdl2_demo.h \
+ libc3/window/sdl2/gl_sphere.h \
+ libc3/window/sdl2/gl_camera.h \
+ libc3/window/sdl2/sdl2_font.c \
+ libc3/window/sdl2/gl.c \
libc3/window/sdl2/window_sdl2.c \
+ libc3/window/sdl2/gl_cylinder.h \
+ libc3/window/sdl2/types.h \
+ libc3/window/sdl2/sdl2_sprite.h \
+ libc3/window/sdl2/gl_camera.c \
+ libc3/window/sdl2/gl_sphere.c \
+ libc3/window/sdl2/gl_cylinder.c \
libc3/window/sdl2/window_sdl2.h \
+ libc3/window/sdl2/gl.h \
+ libc3/window/sdl2/sdl2_font.h \
+ libc3/window/sdl2/sdl2_sprite.c \
+ libc3/window/window.c \
+ libc3/ident.h \
+ libc3/buf_inspect_s64_decimal.c \
+ libc3/buf_inspect_u32_binary.h \
+ libc3/buf_inspect_uw.h \
+ libc3/buf_inspect_u.c.in \
+ libc3/buf_parse_sw.c \
libc3/array.h \
- libc3/u.c.in \
- libc3/u.h.in \
+ libc3/buf_inspect_u32.c \
+ libc3/buf_inspect_s8_decimal.h \
+ libc3/buf_inspect_u16_hexadecimal.c \
+ libc3/buf_parse_u16.h \
+ libc3/set__tag.c \
+ libc3/map.c \
+ libc3/tag_shift_right.c \
+ libc3/tag.c \
+ libc3/buf_parse_u8.h \
+ libc3/buf_inspect_uw_octal.c \
+ libc3/buf_inspect_u8_binary.c \
+ libc3/tag_div.c \
+ libc3/buf_inspect_s64_octal.c \
+ libc3/u16.c \
+ libc3/buf_inspect_sw_hexadecimal.c \
+ libc3/buf_inspect_s32_decimal.c \
+ libc3/buf_inspect_u64_binary.c \
+ libc3/facts_cursor.h \
+ libc3/tuple.h \
+ libc3/buf_inspect_s16_binary.c \
+ libc3/ucd.h \
+ libc3/buf_inspect_s16_octal.c \
+ libc3/buf_inspect_s8.c \
libc3/sha1.h \
- libc3/file.h \
- libc3/c3.h \
- libc3/fn.h \
- libc3/map.h \
- libc3/struct_type.h \
+ libc3/buf_inspect_uw_binary.h \
+ libc3/buf_parse.c \
+ libc3/str.h \
+ libc3/error_handler.h \
+ libc3/u64.c \
+ libc3/buf_inspect_s32_octal.c \
+ libc3/tag_init.h \
+ libc3/tag_mul.c \
+ libc3/facts_spec_cursor.h \
+ libc3/buf_inspect_uw_decimal.c \
+ libc3/sw.c \
+ libc3/file.c \
+ libc3/buf_inspect_s16_decimal.h \
+ libc3/frame.c \
+ libc3/s32.h \
+ libc3/c3.c \
+ libc3/f32.h \
+ libc3/buf_inspect_sw_octal.c \
+ libc3/u8.h \
+ libc3/ptr.h \
+ libc3/set_item__fact.c \
+ libc3/var.c \
+ libc3/module.h \
libc3/license.c \
- libc3/operator.c \
- libc3/ptag.h \
- libc3/tag_add.c \
- libc3/tag_band.c \
- libc3/fn_clause.h \
- libc3/s.c.in \
- libc3/operator.h \
+ libc3/buf_inspect_u32_hexadecimal.c \
+ libc3/buf_parse_u64.h \
+ libc3/buf_inspect_u8_hexadecimal.h \
+ libc3/arg.c \
libc3/fn_clause.c \
- libc3/tag_mod.c \
+ libc3/operator.c \
+ libc3/bool.c \
+ libc3/buf_parse_s32.c \
libc3/ptag.c \
- libc3/var.h \
- libc3/var.c \
- libc3/time.c \
- libc3/time.h \
- libc3/io.h \
- libc3/tag_shift_left.c \
- libc3/tag_shift_right.c \
- libc3/struct.h \
- libc3/tag_init.c \
- libc3/tag_type.c \
- libc3/tag_type.h \
- libc3/struct_type.c \
- 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 \
+ libc3/binding.h \
+ libc3/buf_inspect_u.h.in \
+ libc3/buf_inspect_s16.h \
+ libc3/integer.h \
+ libc3/buf_file.c \
+ libc3/struct.c \
+ libc3/s64.c \
+ libc3/buf_inspect_s32_binary.c \
+ libc3/buf_inspect_u8.h \
+ libc3/facts_spec.h \
+ libc3/buf_inspect_u8_decimal.c \
+ libc3/sign.h \
+ libc3/call.c \
+ libc3/buf_parse_s8.c \
+ libc3/buf_inspect_sw_binary.h \
+ libc3/hash.h \
+ libc3/u32.h \
+ libc3/buf_inspect_u32_octal.c \
+ libc3/character.c \
+ libc3/buf_inspect_u64_decimal.c \
+ libc3/buf_parse_uw.h \
+ libc3/buf_inspect_u32_decimal.c \
+ libc3/buf_inspect_s16_hexadecimal.c \
+ libc3/set_cursor__tag.c \
+ libc3/set_cursor__fact.h \
+ libc3/buf.c \
+ libc3/list_init.h \
+ libc3/abs.c \
+ libc3/buf_parse_s64.h \
+ libc3/buf_inspect_s.c.in \
+ libc3/buf_inspect_s64_binary.h \
+ libc3/buf_inspect_u8_octal.c \
+ libc3/f64.c \
+ libc3/skiplist_node.c.in \
+ libc3/buf_parse_u32.c \
+ libc3/facts_with.h \
+ libc3/buf_inspect_sw.c \
+ libc3/buf_inspect_u16.h \
+ libc3/buf_inspect_s8_hexadecimal.h \
+ libc3/buf_inspect_u16_binary.h \
+ libc3/buf_inspect_u64_hexadecimal.h \
+ libc3/buf_save.c \
+ test/ident_test.c \
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_inspect_test.c \
+ test/libc3_test.c \
+ test/fn_test.c \
test/buf_parse_test_u16.c \
- test/buf_parse_test_u32.c \
- test/buf_parse_test_u64.c \
- test/call_test.c \
- test/facts_cursor_test.c \
+ test/str_test.c \
test/cfn_test.c \
test/character_test.c \
- test/env_test.c \
- test/fact_test.c \
+ test/buf_parse_test_s8.c \
+ test/skiplist__fact_test.c \
+ test/sym_test.c \
+ test/tag_test.h \
+ test/buf_file_test.c \
+ test/bool_test.c \
test/fact_test.h \
- test/libc3_test.c \
- test/str_test.c \
+ test/buf_parse_test_u64.c \
+ test/compare_test.c \
test/facts_with_test.c \
+ test/array_test.c \
+ test/buf_parse_test.h \
+ test/test.h \
+ test/buf_parse_test_su.h \
+ test/env_test.c \
+ test/buf_parse_test_s64.c \
+ test/types_test.c \
test/hash_test.c \
- test/compare_test.c \
- test/compare_test.h \
- test/ident_test.c \
- test/buf_test.c \
- test/set__fact_test.c \
+ test/call_test.c \
test/set__tag_test.c \
- test/skiplist__fact_test.c \
- test/sym_test.c \
+ test/facts_test.c \
+ test/facts_cursor_test.c \
+ test/compare_test.h \
+ test/buf_parse_test_s32.c \
+ test/test.c \
+ test/buf_parse_test.c \
+ test/fact_test.c \
test/tag_test.c \
- test/tag_test.h \
- test/array_test.c \
- test/fn_test.c \
+ test/set__fact_test.c \
+ test/buf_parse_test_u32.c \
+ test/buf_test.c \
+ test/list_test.c \
+ test/buf_parse_test_u8.c \
test/tuple_test.c \
- test/types_test.c \
ucd2c/ucd.h \
ucd2c/ucd2c.c \
diff --git a/sources.sh b/sources.sh
index 8aa7f87..82584e0 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/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/cairo/configure libc3/window/cairo/quartz/configure libc3/window/cairo/quartz/update_sources libc3/window/cairo/quartz/demo/configure libc3/window/cairo/quartz/demo/update_sources libc3/window/cairo/demo/configure libc3/window/cairo/demo/update_sources libc3/window/cairo/update_sources libc3/window/cairo/win32/configure libc3/window/cairo/win32/demo/configure libc3/window/cairo/win32/demo/update_sources libc3/window/cairo/win32/update_sources libc3/window/configure libc3/window/update_sources libc3/window/sdl2/configure libc3/window/sdl2/demo/configure libc3/window/sdl2/demo/macos/configure libc3/window/sdl2/demo/update_sources libc3/window/sdl2/update_sources libtommath/update_sources libtommath/configure test/configure test/update_sources ucd2c/configure '
-C3_MAKEFILES='c3c/Makefile c3s/Makefile ic3/Makefile libc3/gen.mk libc3/Makefile libc3/window/cairo/xcb/Makefile libc3/window/cairo/xcb/demo/Makefile libc3/window/cairo/Makefile libc3/window/cairo/quartz/Makefile libc3/window/cairo/quartz/demo/Makefile libc3/window/cairo/demo/Makefile libc3/window/cairo/win32/Makefile libc3/window/cairo/win32/demo/Makefile libc3/window/Makefile libc3/window/sdl2/Makefile libc3/window/sdl2/demo/Makefile libc3/window/sdl2/demo/macos/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/ic3.c ic3/buf_linenoise.c ic3/buf_linenoise.h ic3/linenoise.c libc3/struct.c libc3/abs.c libc3/buf.c libc3/set__tag.h libc3/set__tag.c libc3/set_item__tag.c 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/set_item__fact.h libc3/call.c libc3/buf_parse.c libc3/arg.c libc3/array.c libc3/binding.c libc3/c3.c libc3/set__fact.h libc3/set_cursor__fact.c libc3/set__fact.c libc3/uw.h libc3/set_cursor__fact.h libc3/uw.c libc3/sw.h libc3/sw.c libc3/buf_parse_uw.h libc3/buf_parse_uw.c libc3/buf_parse_sw.c libc3/buf_parse_sw.h libc3/buf_inspect_uw_hexadecimal.h libc3/buf_inspect_uw_hexadecimal.c libc3/buf_inspect_uw_decimal.h libc3/buf_inspect_uw_decimal.c libc3/u64.c libc3/list_init.c libc3/bool.c libc3/bool.h libc3/buf_file.c libc3/buf_inspect_uw_octal.h libc3/buf_inspect_uw_binary.h libc3/buf_inspect_uw_octal.c libc3/buf_inspect_uw_binary.c libc3/buf_inspect_uw.h libc3/buf_inspect_uw.c libc3/buf_inspect_sw_hexadecimal.h libc3/buf_inspect_sw_hexadecimal.c libc3/buf_inspect_sw_decimal.h libc3/buf_inspect_sw_decimal.c libc3/buf_inspect_sw_octal.c libc3/buf_inspect_sw_octal.h libc3/buf_inspect_sw_binary.h libc3/buf_parse.h libc3/buf.h libc3/buf_save.c libc3/facts_spec_cursor.c libc3/buf_inspect_sw.h libc3/buf_inspect_sw_binary.c libc3/buf_inspect_sw.c libc3/u64.h libc3/s64.c libc3/s64.h libc3/buf_parse_u64.h libc3/buf_parse_u64.c libc3/buf_parse_s64.c libc3/buf_parse_s64.h libc3/buf_inspect_u64_hexadecimal.c libc3/buf_inspect_u64_decimal.h libc3/buf_inspect_u64_hexadecimal.h libc3/buf_inspect_u64_decimal.c libc3/tag_init.h libc3/buf_file.h libc3/buf_save.h libc3/call.h libc3/buf_inspect_u64_octal.c libc3/buf_inspect_u64_octal.h libc3/buf_inspect_u64_binary.h libc3/buf_inspect_u64_binary.c libc3/buf_inspect_u64.h libc3/buf_inspect_u64.c libc3/buf_inspect_s64_hexadecimal.h libc3/buf_inspect_s64_hexadecimal.c libc3/buf_inspect_s64_decimal.c libc3/buf_inspect_s64_decimal.h libc3/buf_inspect_s64_octal.h libc3/binding.h libc3/sequence.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.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.h libc3/u32.c libc3/s32.h libc3/buf_parse_u32.h libc3/s32.c libc3/buf_parse_u32.c libc3/buf_parse_s32.h libc3/buf_inspect_u32_hexadecimal.h libc3/buf_parse_s32.c libc3/buf_inspect_u32_hexadecimal.c libc3/compare.c libc3/buf_inspect.c libc3/compare.h libc3/buf_inspect_u32_decimal.c libc3/buf_inspect_u32_decimal.h libc3/buf_inspect_u32_octal.h libc3/buf_inspect_u32_octal.c libc3/buf_inspect_u32_binary.h libc3/buf_inspect_u32_binary.c libc3/buf_inspect_u32.h libc3/buf_inspect_u32.c libc3/buf_inspect_s32_hexadecimal.h libc3/buf_inspect_s32_hexadecimal.c libc3/buf_inspect_s32.h libc3/error.c libc3/error.h libc3/error_handler.c libc3/eval.h libc3/eval.c libc3/facts.h libc3/buf_inspect_s32_decimal.h libc3/buf_inspect_s32_decimal.c libc3/buf_inspect_s32_octal.h libc3/buf_inspect_s32_binary.c libc3/buf_inspect_s32_binary.h libc3/buf_inspect_s32_octal.c libc3/buf_inspect_s32.c libc3/u16.h libc3/u16.c libc3/s16.h libc3/buf_parse_u16.h libc3/s16.c libc3/buf_parse_u16.c libc3/buf_parse_s16.h libc3/u8.h libc3/list_init.h libc3/fact.c libc3/fact.h libc3/facts_cursor.c libc3/buf_inspect_u16_hexadecimal.h libc3/buf_parse_s16.c libc3/buf_inspect_u16_decimal.h libc3/buf_inspect_u16_hexadecimal.c 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_s16_hexadecimal.h libc3/buf_inspect_u16.c libc3/buf_inspect_s16_octal.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.c libc3/buf_inspect_s16_decimal.h libc3/buf_inspect_s16_octal.c libc3/buf_inspect_s16_binary.c libc3/buf_inspect_s16_binary.h libc3/buf_inspect_s16.h libc3/buf_inspect_s16.c libc3/s8.h libc3/u8.c libc3/s8.c libc3/buf_parse_u8.h libc3/buf_parse_u8.c libc3/buf_parse_u.h.in libc3/facts_with.c libc3/facts_with.h libc3/facts_with_cursor.c libc3/buf_parse_s8.h libc3/buf_parse_s8.c libc3/buf_inspect_u8_hexadecimal.h 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.c libc3/buf_inspect_u8_binary.h libc3/buf_inspect_u8.c libc3/buf_inspect_u8.h libc3/buf_inspect_s8_hexadecimal.h libc3/facts_with_cursor.h libc3/float.h libc3/frame.c libc3/frame.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.c libc3/buf_inspect_s8_binary.h libc3/buf_inspect_s8.c libc3/buf_inspect_s8.h libc3/file.c libc3/hash.h libc3/ident.h libc3/integer.c libc3/integer.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/map.c libc3/abs.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/sequence.h libc3/tag_mul.c libc3/tag_sub.c libc3/set_cursor.c.in libc3/set_cursor.h.in libc3/f32.h libc3/facts.c libc3/set_item.c.in libc3/set_item.h.in libc3/sym.c libc3/s.h.in libc3/sign.c libc3/sign.h libc3/skiplist.c.in libc3/skiplist.h.in libc3/type.h libc3/tag.c libc3/skiplist_node.c.in libc3/skiplist_node.h.in libc3/str.h libc3/tag_div.c libc3/tuple.c libc3/ucd.c libc3/sym.h 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/tag.h libc3/env.c libc3/error_handler.h libc3/ident.c libc3/fn.c libc3/tag_bor.c libc3/tag_bxor.c libc3/buf_inspect_s_base.c.in libc3/buf_inspect_u.c.in libc3/buf_inspect_u.h.in libc3/env.h libc3/arg.h libc3/buf_inspect_u_base.c.in libc3/buf_inspect_u_base.h.in libc3/window/cairo/xcb/config.h libc3/window/cairo/xcb/window_cairo_xcb.c libc3/window/cairo/xcb/demo/window_cairo_xcb_demo.c libc3/window/cairo/xcb/window_cairo_xcb.h libc3/window/cairo/types.h libc3/window/cairo/window_cairo.h libc3/window/cairo/window_cairo.c libc3/window/cairo/quartz/window_cairo_quartz.h libc3/window/cairo/quartz/demo/window_cairo_quartz_demo.c libc3/window/cairo/quartz/window_cairo_quartz_app_delegate.h libc3/window/cairo/quartz/xkbquartz.h libc3/window/cairo/quartz/window_cairo_quartz_view.h libc3/window/cairo/quartz/window_cairo_quartz_view_controller.h libc3/window/cairo/quartz/quartz_to_xkbcommon.c libc3/window/cairo/quartz/quartz_to_xkbcommon.h libc3/window/cairo/demo/bg_rect.c libc3/window/cairo/demo/bg_rect.h libc3/window/cairo/demo/lightspeed.c libc3/window/cairo/demo/lightspeed.h libc3/window/cairo/demo/window_cairo_demo.c libc3/window/cairo/demo/window_cairo_demo.h libc3/window/cairo/demo/toasters.c libc3/window/cairo/demo/flies.c libc3/window/cairo/demo/toasters.h libc3/window/cairo/demo/flies.h libc3/window/cairo/cairo_png.c libc3/window/cairo/win32/demo/window_cairo_win32_demo.c libc3/window/cairo/win32/vk_to_xkbcommon.c libc3/window/cairo/win32/vk_to_xkbcommon.h libc3/window/cairo/win32/window_cairo_win32.c libc3/window/cairo/win32/window_cairo_win32.h libc3/window/cairo/cairo_png.h libc3/window/cairo/cairo_sprite.c libc3/window/cairo/cairo_sprite.h libc3/window/cairo/cairo_font.c libc3/window/cairo/cairo_font.h libc3/window/types.h libc3/window/window.c libc3/window/window.h libc3/window/sdl2/demo/bg_rect.c libc3/window/sdl2/demo/bg_rect.h libc3/window/sdl2/demo/window_sdl2_demo.c libc3/window/sdl2/types.h libc3/window/sdl2/window_sdl2.c libc3/window/sdl2/window_sdl2.h libc3/array.h libc3/u.c.in libc3/u.h.in libc3/sha1.h libc3/file.h libc3/c3.h libc3/fn.h libc3/map.h libc3/struct_type.h libc3/license.c libc3/operator.c libc3/ptag.h libc3/tag_add.c libc3/tag_band.c libc3/fn_clause.h libc3/s.c.in libc3/operator.h libc3/fn_clause.c libc3/tag_mod.c libc3/ptag.c libc3/var.h libc3/var.c libc3/time.c libc3/time.h libc3/io.h libc3/tag_shift_left.c libc3/tag_shift_right.c libc3/struct.h libc3/tag_init.c libc3/tag_type.c libc3/tag_type.h libc3/struct_type.c 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_parse_test_u64.c test/call_test.c test/facts_cursor_test.c test/cfn_test.c test/character_test.c test/env_test.c test/fact_test.c test/fact_test.h test/libc3_test.c test/str_test.c test/facts_with_test.c test/hash_test.c test/compare_test.c test/compare_test.h test/ident_test.c test/buf_test.c test/set__fact_test.c test/set__tag_test.c test/skiplist__fact_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 ucd2c/ucd.h ucd2c/ucd2c.c '
+C3_CONFIGURES='c3c/configure c3s/configure c3s/update_sources ic3/configure ic3/update_sources libc3/configure libc3/update_sources libc3/window/configure libc3/window/update_sources libc3/window/cairo/demo/configure libc3/window/cairo/demo/update_sources libc3/window/cairo/xcb/demo/configure libc3/window/cairo/xcb/demo/update_sources libc3/window/cairo/xcb/configure libc3/window/cairo/xcb/update_sources libc3/window/cairo/configure libc3/window/cairo/update_sources libc3/window/cairo/quartz/demo/configure libc3/window/cairo/quartz/demo/update_sources libc3/window/cairo/quartz/configure libc3/window/cairo/quartz/update_sources libc3/window/cairo/win32/demo/configure libc3/window/cairo/win32/demo/update_sources libc3/window/cairo/win32/configure libc3/window/cairo/win32/update_sources libc3/window/sdl2/demo/macos/configure libc3/window/sdl2/demo/configure libc3/window/sdl2/demo/update_sources libc3/window/sdl2/configure libc3/window/sdl2/update_sources 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/Makefile libc3/window/cairo/demo/Makefile libc3/window/cairo/xcb/demo/Makefile libc3/window/cairo/xcb/Makefile libc3/window/cairo/Makefile libc3/window/cairo/quartz/demo/Makefile libc3/window/cairo/quartz/Makefile libc3/window/cairo/win32/demo/Makefile libc3/window/cairo/win32/Makefile libc3/window/sdl2/demo/macos/Makefile libc3/window/sdl2/demo/Makefile libc3/window/sdl2/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.h ic3/ic3.c ic3/linenoise.c ic3/buf_linenoise.c libc3/buf_inspect_s_base.c.in libc3/type.h libc3/fact.c libc3/time.h libc3/fn.h libc3/s16.h libc3/buf_inspect_s8_octal.h libc3/log.c libc3/error.h libc3/buf_inspect_u64_octal.h libc3/set_item.h.in libc3/compare.c libc3/buf_inspect_s8_binary.h libc3/buf_inspect_uw_hexadecimal.h libc3/uw.c libc3/eval.c libc3/set__fact.c libc3/sym.h libc3/env.h libc3/cfn.c libc3/buf_inspect_u16_octal.h libc3/u.h.in libc3/buf_parse_s16.c libc3/s8.h libc3/quote.h libc3/buf_inspect_s32.h libc3/buf_inspect.c libc3/buf_parse_u.h.in libc3/skiplist_node__fact.h libc3/skiplist__fact.c libc3/tag_add.c libc3/buf_inspect_s32_hexadecimal.h libc3/ceiling.h libc3/struct_type.h libc3/list.c libc3/buf_inspect_u64.c libc3/facts.h libc3/tag_type.h libc3/buf_inspect_u16_decimal.c libc3/tag_sub.c libc3/facts_with_cursor.c libc3/buf_inspect_sw_decimal.c libc3/facts_cursor.c libc3/buf_inspect_u64_binary.h libc3/buf_inspect_sw_hexadecimal.h libc3/buf_inspect_s32_decimal.h libc3/u16.h libc3/buf_inspect_s64_octal.h libc3/buf_inspect_u8_binary.h libc3/buf_inspect_s8.h libc3/buf_inspect_s16_octal.h libc3/ucd.c libc3/buf_inspect_s16_binary.h libc3/tuple.c libc3/buf_inspect_uw_octal.h libc3/buf_parse_u8.c libc3/tag.h libc3/float.h libc3/buf_inspect_u_base.c.in libc3/buf_parse_u16.c libc3/buf_inspect_u16_hexadecimal.h libc3/buf_inspect_s8_decimal.c libc3/buf_inspect_u32.h libc3/array.c libc3/buf_parse_sw.h libc3/set.h.in libc3/s.c.in libc3/buf_parse_s.c.in libc3/map.h libc3/skiplist.h.in libc3/set__tag.h libc3/buf_inspect_s64.c libc3/io.c libc3/set_item__tag.c libc3/sequence.c libc3/types.h libc3/buf_inspect_uw.c libc3/buf_inspect_u32_binary.c libc3/buf_inspect_s64_decimal.h libc3/set_cursor.c.in libc3/ident.c libc3/buf_inspect_s64_hexadecimal.c libc3/bool.h libc3/s.h.in libc3/set.c.in libc3/skiplist.c.in libc3/operator.h libc3/fn_clause.h libc3/buf_parse_s.h.in libc3/buf_inspect_s16.c libc3/binding.c libc3/ptag.h libc3/buf_parse_s32.h libc3/tag_bor.c libc3/var.h libc3/tag_shift_left.c libc3/set_item__fact.h libc3/ptr.c libc3/u8.c libc3/set_cursor.h.in libc3/f32.c libc3/buf_inspect_sw_octal.h libc3/c3.h libc3/arg.h libc3/buf_inspect_u8_hexadecimal.c libc3/buf_inspect_u32_hexadecimal.h libc3/buf_parse_u64.c libc3/module.c libc3/frame.h libc3/buf_inspect_s16_decimal.c libc3/file.h libc3/sw.h libc3/s32.c libc3/error_handler.c libc3/str.c libc3/buf_parse.h libc3/buf_inspect_uw_binary.c libc3/buf_inspect_uw_decimal.h libc3/facts_spec_cursor.c libc3/tag_init.c libc3/u64.h libc3/buf_inspect_u_base.h.in libc3/buf_inspect_s32_octal.h libc3/f64.h libc3/buf_inspect_u8_octal.h libc3/buf_inspect_s64_binary.c libc3/buf_inspect_u64_hexadecimal.c libc3/buf_inspect_u16_binary.c libc3/buf_save.h libc3/buf_inspect_u16.c libc3/buf_inspect_s8_hexadecimal.c libc3/u.c.in libc3/buf_inspect_sw.h libc3/facts_with.c libc3/buf_parse_u.c.in libc3/buf_parse_u32.h libc3/set_cursor__fact.c libc3/buf.h libc3/set_cursor__tag.h libc3/buf_inspect_s16_hexadecimal.h libc3/buf_inspect_u32_decimal.h libc3/buf_parse_uw.c libc3/buf_parse_s64.c libc3/abs.h libc3/list_init.c libc3/buf_inspect_sw_binary.c libc3/buf_parse_s8.h libc3/call.h libc3/sign.c libc3/buf_inspect_u8_decimal.h libc3/character.h libc3/buf_inspect_u64_decimal.h libc3/buf_inspect_s_base.h.in libc3/buf_inspect_u32_octal.h libc3/u32.c libc3/hash.c libc3/buf_file.h libc3/struct.h libc3/integer.c libc3/buf_inspect_u8.c libc3/facts_spec.c libc3/buf_inspect_s32_binary.h libc3/set_item.c.in libc3/tag_bxor.c libc3/s64.h libc3/buf_inspect_u16_decimal.h libc3/tag_type.c libc3/facts.c libc3/buf_inspect_u64.h libc3/buf_inspect_sw_decimal.h libc3/facts_with_cursor.h libc3/skiplist_node__fact.c libc3/buf_inspect.h libc3/quote.c libc3/buf_inspect_s32.c libc3/skiplist_node.h.in libc3/s8.c libc3/buf_parse_s16.h libc3/list.h libc3/struct_type.c libc3/ceiling.c libc3/buf_inspect_s.h.in libc3/buf_inspect_s32_hexadecimal.c libc3/skiplist__fact.h libc3/uw.h libc3/buf_inspect_uw_hexadecimal.c libc3/buf_inspect_s8_binary.c libc3/tag_mod.c libc3/compare.h libc3/buf_inspect_u64_octal.c libc3/buf_inspect_u16_octal.c libc3/tag_band.c libc3/cfn.h libc3/env.c libc3/set__fact.h libc3/sym.c libc3/eval.h libc3/c3_main.h libc3/buf_inspect_s8_octal.c libc3/s16.c libc3/fn.c libc3/time.c libc3/fact.h libc3/type.c libc3/error.c libc3/log.h libc3/sequence.h libc3/set_item__tag.h libc3/io.h libc3/buf_inspect_s64.h libc3/buf_inspect_s64_hexadecimal.h libc3/window/types.h libc3/window/window.h libc3/window/cairo/demo/toasters.h libc3/window/cairo/demo/window_cairo_demo.c libc3/window/cairo/demo/lightspeed.h libc3/window/cairo/demo/flies.h libc3/window/cairo/demo/bg_rect.h libc3/window/cairo/demo/window_cairo_demo.h libc3/window/cairo/demo/toasters.c libc3/window/cairo/demo/lightspeed.c libc3/window/cairo/demo/flies.c libc3/window/cairo/demo/bg_rect.c libc3/window/cairo/xcb/demo/window_cairo_xcb_demo.c libc3/window/cairo/xcb/window_cairo_xcb.h libc3/window/cairo/xcb/config.h libc3/window/cairo/xcb/window_cairo_xcb.c libc3/window/cairo/types.h libc3/window/cairo/window_cairo.c libc3/window/cairo/cairo_font.h libc3/window/cairo/cairo_sprite.h libc3/window/cairo/quartz/demo/window_cairo_quartz_demo.c libc3/window/cairo/quartz/window_cairo_quartz_view_controller.h libc3/window/cairo/quartz/quartz_to_xkbcommon.c libc3/window/cairo/quartz/window_cairo_quartz.h libc3/window/cairo/quartz/window_cairo_quartz_app_delegate.h libc3/window/cairo/quartz/quartz_to_xkbcommon.h libc3/window/cairo/quartz/xkbquartz.h libc3/window/cairo/quartz/window_cairo_quartz_view.h libc3/window/cairo/window_cairo.h libc3/window/cairo/cairo_font.c libc3/window/cairo/win32/demo/window_cairo_win32_demo.c libc3/window/cairo/win32/vk_to_xkbcommon.c libc3/window/cairo/win32/window_cairo_win32.h libc3/window/cairo/win32/vk_to_xkbcommon.h libc3/window/cairo/win32/window_cairo_win32.c libc3/window/cairo/cairo_sprite.c libc3/window/sdl2/demo/toasters.h libc3/window/sdl2/demo/earth.h libc3/window/sdl2/demo/lightspeed.h libc3/window/sdl2/demo/flies.h libc3/window/sdl2/demo/window_sdl2_demo.c libc3/window/sdl2/demo/bg_rect.h libc3/window/sdl2/demo/toasters.c libc3/window/sdl2/demo/earth.c libc3/window/sdl2/demo/lightspeed.c libc3/window/sdl2/demo/flies.c libc3/window/sdl2/demo/bg_rect.c libc3/window/sdl2/demo/window_sdl2_demo.h libc3/window/sdl2/gl_sphere.h libc3/window/sdl2/gl_camera.h libc3/window/sdl2/sdl2_font.c libc3/window/sdl2/gl.c libc3/window/sdl2/window_sdl2.c libc3/window/sdl2/gl_cylinder.h libc3/window/sdl2/types.h libc3/window/sdl2/sdl2_sprite.h libc3/window/sdl2/gl_camera.c libc3/window/sdl2/gl_sphere.c libc3/window/sdl2/gl_cylinder.c libc3/window/sdl2/window_sdl2.h libc3/window/sdl2/gl.h libc3/window/sdl2/sdl2_font.h libc3/window/sdl2/sdl2_sprite.c libc3/window/window.c libc3/ident.h libc3/buf_inspect_s64_decimal.c libc3/buf_inspect_u32_binary.h libc3/buf_inspect_uw.h libc3/buf_inspect_u.c.in libc3/buf_parse_sw.c libc3/array.h libc3/buf_inspect_u32.c libc3/buf_inspect_s8_decimal.h libc3/buf_inspect_u16_hexadecimal.c libc3/buf_parse_u16.h libc3/set__tag.c libc3/map.c libc3/tag_shift_right.c libc3/tag.c libc3/buf_parse_u8.h libc3/buf_inspect_uw_octal.c libc3/buf_inspect_u8_binary.c libc3/tag_div.c libc3/buf_inspect_s64_octal.c libc3/u16.c libc3/buf_inspect_sw_hexadecimal.c libc3/buf_inspect_s32_decimal.c libc3/buf_inspect_u64_binary.c libc3/facts_cursor.h libc3/tuple.h libc3/buf_inspect_s16_binary.c libc3/ucd.h libc3/buf_inspect_s16_octal.c libc3/buf_inspect_s8.c libc3/sha1.h libc3/buf_inspect_uw_binary.h libc3/buf_parse.c libc3/str.h libc3/error_handler.h libc3/u64.c libc3/buf_inspect_s32_octal.c libc3/tag_init.h libc3/tag_mul.c libc3/facts_spec_cursor.h libc3/buf_inspect_uw_decimal.c libc3/sw.c libc3/file.c libc3/buf_inspect_s16_decimal.h libc3/frame.c libc3/s32.h libc3/c3.c libc3/f32.h libc3/buf_inspect_sw_octal.c libc3/u8.h libc3/ptr.h libc3/set_item__fact.c libc3/var.c libc3/module.h libc3/license.c libc3/buf_inspect_u32_hexadecimal.c libc3/buf_parse_u64.h libc3/buf_inspect_u8_hexadecimal.h libc3/arg.c libc3/fn_clause.c libc3/operator.c libc3/bool.c libc3/buf_parse_s32.c libc3/ptag.c libc3/binding.h libc3/buf_inspect_u.h.in libc3/buf_inspect_s16.h libc3/integer.h libc3/buf_file.c libc3/struct.c libc3/s64.c libc3/buf_inspect_s32_binary.c libc3/buf_inspect_u8.h libc3/facts_spec.h libc3/buf_inspect_u8_decimal.c libc3/sign.h libc3/call.c libc3/buf_parse_s8.c libc3/buf_inspect_sw_binary.h libc3/hash.h libc3/u32.h libc3/buf_inspect_u32_octal.c libc3/character.c libc3/buf_inspect_u64_decimal.c libc3/buf_parse_uw.h libc3/buf_inspect_u32_decimal.c libc3/buf_inspect_s16_hexadecimal.c libc3/set_cursor__tag.c libc3/set_cursor__fact.h libc3/buf.c libc3/list_init.h libc3/abs.c libc3/buf_parse_s64.h libc3/buf_inspect_s.c.in libc3/buf_inspect_s64_binary.h libc3/buf_inspect_u8_octal.c libc3/f64.c libc3/skiplist_node.c.in libc3/buf_parse_u32.c libc3/facts_with.h libc3/buf_inspect_sw.c libc3/buf_inspect_u16.h libc3/buf_inspect_s8_hexadecimal.h libc3/buf_inspect_u16_binary.h libc3/buf_inspect_u64_hexadecimal.h libc3/buf_save.c test/ident_test.c test/buf_parse_test_s16.c test/buf_inspect_test.c test/libc3_test.c test/fn_test.c test/buf_parse_test_u16.c test/str_test.c test/cfn_test.c test/character_test.c test/buf_parse_test_s8.c test/skiplist__fact_test.c test/sym_test.c test/tag_test.h test/buf_file_test.c test/bool_test.c test/fact_test.h test/buf_parse_test_u64.c test/compare_test.c test/facts_with_test.c test/array_test.c test/buf_parse_test.h test/test.h test/buf_parse_test_su.h test/env_test.c test/buf_parse_test_s64.c test/types_test.c test/hash_test.c test/call_test.c test/set__tag_test.c test/facts_test.c test/facts_cursor_test.c test/compare_test.h test/buf_parse_test_s32.c test/test.c test/buf_parse_test.c test/fact_test.c test/tag_test.c test/set__fact_test.c test/buf_parse_test_u32.c test/buf_test.c test/list_test.c test/buf_parse_test_u8.c test/tuple_test.c ucd2c/ucd.h ucd2c/ucd2c.c '