@@ -257,9 +257,9 @@ Script interpreter. Works the same as ic3 but is not interactive.
- maps
- A map maps keys to values according to an internal hash table.
- `%{a: 1, 2 => 3}`
- - access (get symbol)
- - get
- - put
+ - access (get symbol key value)
+ - get (get key value)
+ - put (return a new map)
- machine word alignment (from rtbuf)
- structs
- structs are a special kind of map with their fields sorted according to a spec.
@@ -16,8 +16,8 @@
*
* Functions that return the absolute value of a number.
*/
-#ifndef ABS_H
-#define ABS_H
+#ifndef LIBC3_ABS_H
+#define LIBC3_ABS_H
#include "types.h"
@@ -35,4 +35,4 @@ DEF_ABS_PROTOTYPE(u32);
DEF_ABS_PROTOTYPE(u64);
DEF_ABS_PROTOTYPE(uw);
-#endif /* ABS_H */
+#endif /* LIBC3_ABS_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef ARG_H
-#define ARG_H
+#ifndef LIBC3_ARG_H
+#define LIBC3_ARG_H
#include "types.h"
@@ -28,4 +28,4 @@ void arg_delete_all (s_arg *arg);
/* observers */
uw arg_length (s_arg *args);
-#endif /* ARG_H */
+#endif /* LIBC3_ARG_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef ARRAY_H
-#define ARRAY_H
+#ifndef LIBC3_ARRAY_H
+#define LIBC3_ARRAY_H
#include "types.h"
@@ -30,4 +30,4 @@ f_buf_inspect_size array_type_to_buf_inspect_size (const s_sym *type);
f_copy array_type_to_copy (const s_sym *type);
e_tag_type array_type_to_tag_type (const s_sym *type);
-#endif /* ARRAY_H */
+#endif /* LIBC3_ARRAY_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef BINDING_H
-#define BINDING_H
+#ifndef LIBC3_BINDING_H
+#define LIBC3_BINDING_H
#include "types.h"
@@ -33,4 +33,4 @@ const s_tag * binding_get (const s_binding *binding, const s_sym *name);
const s_tag * binding_is_bound (const s_binding *binding,
const s_sym *name);
-#endif /* BINDING_H */
+#endif /* LIBC3_BINDING_H */
@@ -16,8 +16,8 @@
*
* Structure to manipulate booleans.
*/
-#ifndef BOOL_H
-#define BOOL_H
+#ifndef LIBC3_BOOL_H
+#define LIBC3_BOOL_H
#include "types.h"
@@ -25,4 +25,4 @@
bool * bool_copy (const bool *src, bool *dest);
s_str * bool_inspect (bool *b, s_str *dest);
-#endif /* BOOL_H */
+#endif /* LIBC3_BOOL_H */
@@ -16,8 +16,8 @@
*
* Structure to manipulate byte buffers.
*/
-#ifndef BUF_H
-#define BUF_H
+#ifndef LIBC3_BUF_H
+#define LIBC3_BUF_H
#include <assert.h>
#include <err.h>
@@ -105,4 +105,4 @@ sw buf_xfer_reverse(s_buf *src, s_buf *dest);
/* Observers. */
s_str * buf_to_str (const s_buf *buf, s_str *dest);
-#endif /* BUF_H */
+#endif /* LIBC3_BUF_H */
@@ -14,8 +14,8 @@
* @file buf_file.h
* @brief s_buf interface to stdio.h FILE *.
*/
-#ifndef BUF_FILE_H
-#define BUF_FILE_H
+#ifndef LIBC3_BUF_FILE_H
+#define LIBC3_BUF_FILE_H
#include <stdio.h>
#include "types.h"
@@ -28,4 +28,4 @@ s_buf * buf_file_open_r (s_buf *buf, FILE *fp);
s_buf * buf_file_open_w (s_buf *buf, FILE *fp);
void buf_file_close (s_buf *buf);
-#endif /* BUF_FILE_H */
+#endif /* LIBC3_BUF_FILE_H */
@@ -16,8 +16,8 @@
*
* Structure to inspect data into UTF-8.
*/
-#ifndef BUF_INSPECT_H
-#define BUF_INSPECT_H
+#ifndef LIBC3_BUF_INSPECT_H
+#define LIBC3_BUF_INSPECT_H
#include "types.h"
@@ -139,4 +139,4 @@ sw buf_inspect_var_size (const s_tag *var);
sw buf_inspect_void (s_buf *buf, const void *_);
sw buf_inspect_void_size (const void *_);
-#endif /* BUF_INSPECT_H */
+#endif /* LIBC3_BUF_INSPECT_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s.h.in BITS=_BITS$ bits=_bits$ */
-#ifndef BUF_INSPECT_S_BITS$_H
-#define BUF_INSPECT_S_BITS$_H
+#ifndef LIBC3_BUF_INSPECT_S_BITS$_H
+#define LIBC3_BUF_INSPECT_S_BITS$_H
#include "types.h"
sw buf_inspect_s_bits$ (s_buf *buf, const s_bits$ *s);
sw buf_inspect_s_bits$_size (const s_bits$ *s);
-#endif /* ndef BUF_INSPECT_S_BITS$_H */
+#endif /* LIBC3_BUF_INSPECT_S_BITS$_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s.h.in BITS=16 bits=16 */
-#ifndef BUF_INSPECT_S16_H
-#define BUF_INSPECT_S16_H
+#ifndef LIBC3_BUF_INSPECT_S16_H
+#define LIBC3_BUF_INSPECT_S16_H
#include "types.h"
sw buf_inspect_s16 (s_buf *buf, const s16 *s);
sw buf_inspect_s16_size (const s16 *s);
-#endif /* ndef BUF_INSPECT_S16_H */
+#endif /* LIBC3_BUF_INSPECT_S16_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=16 bits=16 base=binary */
+#ifndef LIBC3_BUF_INSPECT_S16_binary_H
+#define LIBC3_BUF_INSPECT_S16_binary_H
+
#include "types.h"
sw buf_inspect_s16_binary (s_buf *buf, const s16 *s);
sw buf_inspect_s16_binary_size (const s16 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S16_binary_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=16 bits=16 base=decimal */
+#ifndef LIBC3_BUF_INSPECT_S16_decimal_H
+#define LIBC3_BUF_INSPECT_S16_decimal_H
+
#include "types.h"
sw buf_inspect_s16_decimal (s_buf *buf, const s16 *s);
sw buf_inspect_s16_decimal_size (const s16 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S16_decimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=16 bits=16 base=hexadecimal */
+#ifndef LIBC3_BUF_INSPECT_S16_hexadecimal_H
+#define LIBC3_BUF_INSPECT_S16_hexadecimal_H
+
#include "types.h"
sw buf_inspect_s16_hexadecimal (s_buf *buf, const s16 *s);
sw buf_inspect_s16_hexadecimal_size (const s16 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S16_hexadecimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=16 bits=16 base=octal */
+#ifndef LIBC3_BUF_INSPECT_S16_octal_H
+#define LIBC3_BUF_INSPECT_S16_octal_H
+
#include "types.h"
sw buf_inspect_s16_octal (s_buf *buf, const s16 *s);
sw buf_inspect_s16_octal_size (const s16 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S16_octal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s.h.in BITS=32 bits=32 */
-#ifndef BUF_INSPECT_S32_H
-#define BUF_INSPECT_S32_H
+#ifndef LIBC3_BUF_INSPECT_S32_H
+#define LIBC3_BUF_INSPECT_S32_H
#include "types.h"
sw buf_inspect_s32 (s_buf *buf, const s32 *s);
sw buf_inspect_s32_size (const s32 *s);
-#endif /* ndef BUF_INSPECT_S32_H */
+#endif /* LIBC3_BUF_INSPECT_S32_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=32 bits=32 base=binary */
+#ifndef LIBC3_BUF_INSPECT_S32_binary_H
+#define LIBC3_BUF_INSPECT_S32_binary_H
+
#include "types.h"
sw buf_inspect_s32_binary (s_buf *buf, const s32 *s);
sw buf_inspect_s32_binary_size (const s32 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S32_binary_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=32 bits=32 base=decimal */
+#ifndef LIBC3_BUF_INSPECT_S32_decimal_H
+#define LIBC3_BUF_INSPECT_S32_decimal_H
+
#include "types.h"
sw buf_inspect_s32_decimal (s_buf *buf, const s32 *s);
sw buf_inspect_s32_decimal_size (const s32 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S32_decimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=32 bits=32 base=hexadecimal */
+#ifndef LIBC3_BUF_INSPECT_S32_hexadecimal_H
+#define LIBC3_BUF_INSPECT_S32_hexadecimal_H
+
#include "types.h"
sw buf_inspect_s32_hexadecimal (s_buf *buf, const s32 *s);
sw buf_inspect_s32_hexadecimal_size (const s32 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S32_hexadecimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=32 bits=32 base=octal */
+#ifndef LIBC3_BUF_INSPECT_S32_octal_H
+#define LIBC3_BUF_INSPECT_S32_octal_H
+
#include "types.h"
sw buf_inspect_s32_octal (s_buf *buf, const s32 *s);
sw buf_inspect_s32_octal_size (const s32 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S32_octal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s.h.in BITS=64 bits=64 */
-#ifndef BUF_INSPECT_S64_H
-#define BUF_INSPECT_S64_H
+#ifndef LIBC3_BUF_INSPECT_S64_H
+#define LIBC3_BUF_INSPECT_S64_H
#include "types.h"
sw buf_inspect_s64 (s_buf *buf, const s64 *s);
sw buf_inspect_s64_size (const s64 *s);
-#endif /* ndef BUF_INSPECT_S64_H */
+#endif /* LIBC3_BUF_INSPECT_S64_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=64 bits=64 base=binary */
+#ifndef LIBC3_BUF_INSPECT_S64_binary_H
+#define LIBC3_BUF_INSPECT_S64_binary_H
+
#include "types.h"
sw buf_inspect_s64_binary (s_buf *buf, const s64 *s);
sw buf_inspect_s64_binary_size (const s64 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S64_binary_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=64 bits=64 base=decimal */
+#ifndef LIBC3_BUF_INSPECT_S64_decimal_H
+#define LIBC3_BUF_INSPECT_S64_decimal_H
+
#include "types.h"
sw buf_inspect_s64_decimal (s_buf *buf, const s64 *s);
sw buf_inspect_s64_decimal_size (const s64 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S64_decimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=64 bits=64 base=hexadecimal */
+#ifndef LIBC3_BUF_INSPECT_S64_hexadecimal_H
+#define LIBC3_BUF_INSPECT_S64_hexadecimal_H
+
#include "types.h"
sw buf_inspect_s64_hexadecimal (s_buf *buf, const s64 *s);
sw buf_inspect_s64_hexadecimal_size (const s64 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S64_hexadecimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=64 bits=64 base=octal */
+#ifndef LIBC3_BUF_INSPECT_S64_octal_H
+#define LIBC3_BUF_INSPECT_S64_octal_H
+
#include "types.h"
sw buf_inspect_s64_octal (s_buf *buf, const s64 *s);
sw buf_inspect_s64_octal_size (const s64 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S64_octal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s.h.in BITS=8 bits=8 */
-#ifndef BUF_INSPECT_S8_H
-#define BUF_INSPECT_S8_H
+#ifndef LIBC3_BUF_INSPECT_S8_H
+#define LIBC3_BUF_INSPECT_S8_H
#include "types.h"
sw buf_inspect_s8 (s_buf *buf, const s8 *s);
sw buf_inspect_s8_size (const s8 *s);
-#endif /* ndef BUF_INSPECT_S8_H */
+#endif /* LIBC3_BUF_INSPECT_S8_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=8 bits=8 base=binary */
+#ifndef LIBC3_BUF_INSPECT_S8_binary_H
+#define LIBC3_BUF_INSPECT_S8_binary_H
+
#include "types.h"
sw buf_inspect_s8_binary (s_buf *buf, const s8 *s);
sw buf_inspect_s8_binary_size (const s8 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S8_binary_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=8 bits=8 base=decimal */
+#ifndef LIBC3_BUF_INSPECT_S8_decimal_H
+#define LIBC3_BUF_INSPECT_S8_decimal_H
+
#include "types.h"
sw buf_inspect_s8_decimal (s_buf *buf, const s8 *s);
sw buf_inspect_s8_decimal_size (const s8 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S8_decimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=8 bits=8 base=hexadecimal */
+#ifndef LIBC3_BUF_INSPECT_S8_hexadecimal_H
+#define LIBC3_BUF_INSPECT_S8_hexadecimal_H
+
#include "types.h"
sw buf_inspect_s8_hexadecimal (s_buf *buf, const s8 *s);
sw buf_inspect_s8_hexadecimal_size (const s8 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S8_hexadecimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=8 bits=8 base=octal */
+#ifndef LIBC3_BUF_INSPECT_S8_octal_H
+#define LIBC3_BUF_INSPECT_S8_octal_H
+
#include "types.h"
sw buf_inspect_s8_octal (s_buf *buf, const s8 *s);
sw buf_inspect_s8_octal_size (const s8 *s);
+
+#endif /* LIBC3_BUF_INSPECT_S8_octal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=_BITS$ bits=_bits$ base=_BASE$ */
+#ifndef LIBC3_BUF_INSPECT_S_BITS$__BASE$_H
+#define LIBC3_BUF_INSPECT_S_BITS$__BASE$_H
+
#include "types.h"
sw buf_inspect_s_bits$__BASE$ (s_buf *buf, const s_bits$ *s);
sw buf_inspect_s_bits$__BASE$_size (const s_bits$ *s);
+
+#endif /* LIBC3_BUF_INSPECT_S_BITS$__BASE$_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s.h.in BITS=W bits=w */
-#ifndef BUF_INSPECT_SW_H
-#define BUF_INSPECT_SW_H
+#ifndef LIBC3_BUF_INSPECT_SW_H
+#define LIBC3_BUF_INSPECT_SW_H
#include "types.h"
sw buf_inspect_sw (s_buf *buf, const sw *s);
sw buf_inspect_sw_size (const sw *s);
-#endif /* ndef BUF_INSPECT_SW_H */
+#endif /* LIBC3_BUF_INSPECT_SW_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=W bits=w base=binary */
+#ifndef LIBC3_BUF_INSPECT_SW_binary_H
+#define LIBC3_BUF_INSPECT_SW_binary_H
+
#include "types.h"
sw buf_inspect_sw_binary (s_buf *buf, const sw *s);
sw buf_inspect_sw_binary_size (const sw *s);
+
+#endif /* LIBC3_BUF_INSPECT_SW_binary_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=W bits=w base=decimal */
+#ifndef LIBC3_BUF_INSPECT_SW_decimal_H
+#define LIBC3_BUF_INSPECT_SW_decimal_H
+
#include "types.h"
sw buf_inspect_sw_decimal (s_buf *buf, const sw *s);
sw buf_inspect_sw_decimal_size (const sw *s);
+
+#endif /* LIBC3_BUF_INSPECT_SW_decimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=W bits=w base=hexadecimal */
+#ifndef LIBC3_BUF_INSPECT_SW_hexadecimal_H
+#define LIBC3_BUF_INSPECT_SW_hexadecimal_H
+
#include "types.h"
sw buf_inspect_sw_hexadecimal (s_buf *buf, const sw *s);
sw buf_inspect_sw_hexadecimal_size (const sw *s);
+
+#endif /* LIBC3_BUF_INSPECT_SW_hexadecimal_H */
@@ -11,7 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_s_base.c.in BITS=W bits=w base=octal */
+#ifndef LIBC3_BUF_INSPECT_SW_octal_H
+#define LIBC3_BUF_INSPECT_SW_octal_H
+
#include "types.h"
sw buf_inspect_sw_octal (s_buf *buf, const sw *s);
sw buf_inspect_sw_octal_size (const sw *s);
+
+#endif /* LIBC3_BUF_INSPECT_SW_octal_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u.h.in BITS=_BITS$ bits=_bits$ */
-#ifndef BUF_INSPECT_U_BITS$_H
-#define BUF_INSPECT_U_BITS$_H
+#ifndef LIBC3_BUF_INSPECT_U_BITS$_H
+#define LIBC3_BUF_INSPECT_U_BITS$_H
#include "types.h"
@@ -24,4 +24,4 @@ sw buf_inspect_u_bits$_base_size (const s_str *base,
const u_bits$ *u);
sw buf_inspect_u_bits$_size (const u_bits$ *u);
-#endif /* ndef BUF_INSPECT_U_BITS$_H */
+#endif /* LIBC3_BUF_INSPECT_U_BITS$_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u.h.in BITS=16 bits=16 */
-#ifndef BUF_INSPECT_U16_H
-#define BUF_INSPECT_U16_H
+#ifndef LIBC3_BUF_INSPECT_U16_H
+#define LIBC3_BUF_INSPECT_U16_H
#include "types.h"
@@ -24,4 +24,4 @@ sw buf_inspect_u16_base_size (const s_str *base,
const u16 *u);
sw buf_inspect_u16_size (const u16 *u);
-#endif /* ndef BUF_INSPECT_U16_H */
+#endif /* LIBC3_BUF_INSPECT_U16_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=16 bits=16 BASE=binary */
-#ifndef BUF_INSPECT_U16_binary_H
-#define BUF_INSPECT_U16_binary_H
+#ifndef LIBC3_BUF_INSPECT_U16_binary_H
+#define LIBC3_BUF_INSPECT_U16_binary_H
#include "types.h"
sw buf_inspect_u16_binary (s_buf *buf, const u16 *u);
sw buf_inspect_u16_binary_size (const u16 *u);
-#endif /* ndef BUF_INSPECT_U16_binary_H */
+#endif /* LIBC3_BUF_INSPECT_U16_binary_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=16 bits=16 BASE=decimal */
-#ifndef BUF_INSPECT_U16_decimal_H
-#define BUF_INSPECT_U16_decimal_H
+#ifndef LIBC3_BUF_INSPECT_U16_decimal_H
+#define LIBC3_BUF_INSPECT_U16_decimal_H
#include "types.h"
sw buf_inspect_u16_decimal (s_buf *buf, const u16 *u);
sw buf_inspect_u16_decimal_size (const u16 *u);
-#endif /* ndef BUF_INSPECT_U16_decimal_H */
+#endif /* LIBC3_BUF_INSPECT_U16_decimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=16 bits=16 BASE=hexadecimal */
-#ifndef BUF_INSPECT_U16_hexadecimal_H
-#define BUF_INSPECT_U16_hexadecimal_H
+#ifndef LIBC3_BUF_INSPECT_U16_hexadecimal_H
+#define LIBC3_BUF_INSPECT_U16_hexadecimal_H
#include "types.h"
sw buf_inspect_u16_hexadecimal (s_buf *buf, const u16 *u);
sw buf_inspect_u16_hexadecimal_size (const u16 *u);
-#endif /* ndef BUF_INSPECT_U16_hexadecimal_H */
+#endif /* LIBC3_BUF_INSPECT_U16_hexadecimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=16 bits=16 BASE=octal */
-#ifndef BUF_INSPECT_U16_octal_H
-#define BUF_INSPECT_U16_octal_H
+#ifndef LIBC3_BUF_INSPECT_U16_octal_H
+#define LIBC3_BUF_INSPECT_U16_octal_H
#include "types.h"
sw buf_inspect_u16_octal (s_buf *buf, const u16 *u);
sw buf_inspect_u16_octal_size (const u16 *u);
-#endif /* ndef BUF_INSPECT_U16_octal_H */
+#endif /* LIBC3_BUF_INSPECT_U16_octal_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u.h.in BITS=32 bits=32 */
-#ifndef BUF_INSPECT_U32_H
-#define BUF_INSPECT_U32_H
+#ifndef LIBC3_BUF_INSPECT_U32_H
+#define LIBC3_BUF_INSPECT_U32_H
#include "types.h"
@@ -24,4 +24,4 @@ sw buf_inspect_u32_base_size (const s_str *base,
const u32 *u);
sw buf_inspect_u32_size (const u32 *u);
-#endif /* ndef BUF_INSPECT_U32_H */
+#endif /* LIBC3_BUF_INSPECT_U32_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=32 bits=32 BASE=binary */
-#ifndef BUF_INSPECT_U32_binary_H
-#define BUF_INSPECT_U32_binary_H
+#ifndef LIBC3_BUF_INSPECT_U32_binary_H
+#define LIBC3_BUF_INSPECT_U32_binary_H
#include "types.h"
sw buf_inspect_u32_binary (s_buf *buf, const u32 *u);
sw buf_inspect_u32_binary_size (const u32 *u);
-#endif /* ndef BUF_INSPECT_U32_binary_H */
+#endif /* LIBC3_BUF_INSPECT_U32_binary_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=32 bits=32 BASE=decimal */
-#ifndef BUF_INSPECT_U32_decimal_H
-#define BUF_INSPECT_U32_decimal_H
+#ifndef LIBC3_BUF_INSPECT_U32_decimal_H
+#define LIBC3_BUF_INSPECT_U32_decimal_H
#include "types.h"
sw buf_inspect_u32_decimal (s_buf *buf, const u32 *u);
sw buf_inspect_u32_decimal_size (const u32 *u);
-#endif /* ndef BUF_INSPECT_U32_decimal_H */
+#endif /* LIBC3_BUF_INSPECT_U32_decimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=32 bits=32 BASE=hexadecimal */
-#ifndef BUF_INSPECT_U32_hexadecimal_H
-#define BUF_INSPECT_U32_hexadecimal_H
+#ifndef LIBC3_BUF_INSPECT_U32_hexadecimal_H
+#define LIBC3_BUF_INSPECT_U32_hexadecimal_H
#include "types.h"
sw buf_inspect_u32_hexadecimal (s_buf *buf, const u32 *u);
sw buf_inspect_u32_hexadecimal_size (const u32 *u);
-#endif /* ndef BUF_INSPECT_U32_hexadecimal_H */
+#endif /* LIBC3_BUF_INSPECT_U32_hexadecimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=32 bits=32 BASE=octal */
-#ifndef BUF_INSPECT_U32_octal_H
-#define BUF_INSPECT_U32_octal_H
+#ifndef LIBC3_BUF_INSPECT_U32_octal_H
+#define LIBC3_BUF_INSPECT_U32_octal_H
#include "types.h"
sw buf_inspect_u32_octal (s_buf *buf, const u32 *u);
sw buf_inspect_u32_octal_size (const u32 *u);
-#endif /* ndef BUF_INSPECT_U32_octal_H */
+#endif /* LIBC3_BUF_INSPECT_U32_octal_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u.h.in BITS=64 bits=64 */
-#ifndef BUF_INSPECT_U64_H
-#define BUF_INSPECT_U64_H
+#ifndef LIBC3_BUF_INSPECT_U64_H
+#define LIBC3_BUF_INSPECT_U64_H
#include "types.h"
@@ -24,4 +24,4 @@ sw buf_inspect_u64_base_size (const s_str *base,
const u64 *u);
sw buf_inspect_u64_size (const u64 *u);
-#endif /* ndef BUF_INSPECT_U64_H */
+#endif /* LIBC3_BUF_INSPECT_U64_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=64 bits=64 BASE=binary */
-#ifndef BUF_INSPECT_U64_binary_H
-#define BUF_INSPECT_U64_binary_H
+#ifndef LIBC3_BUF_INSPECT_U64_binary_H
+#define LIBC3_BUF_INSPECT_U64_binary_H
#include "types.h"
sw buf_inspect_u64_binary (s_buf *buf, const u64 *u);
sw buf_inspect_u64_binary_size (const u64 *u);
-#endif /* ndef BUF_INSPECT_U64_binary_H */
+#endif /* LIBC3_BUF_INSPECT_U64_binary_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=64 bits=64 BASE=decimal */
-#ifndef BUF_INSPECT_U64_decimal_H
-#define BUF_INSPECT_U64_decimal_H
+#ifndef LIBC3_BUF_INSPECT_U64_decimal_H
+#define LIBC3_BUF_INSPECT_U64_decimal_H
#include "types.h"
sw buf_inspect_u64_decimal (s_buf *buf, const u64 *u);
sw buf_inspect_u64_decimal_size (const u64 *u);
-#endif /* ndef BUF_INSPECT_U64_decimal_H */
+#endif /* LIBC3_BUF_INSPECT_U64_decimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=64 bits=64 BASE=hexadecimal */
-#ifndef BUF_INSPECT_U64_hexadecimal_H
-#define BUF_INSPECT_U64_hexadecimal_H
+#ifndef LIBC3_BUF_INSPECT_U64_hexadecimal_H
+#define LIBC3_BUF_INSPECT_U64_hexadecimal_H
#include "types.h"
sw buf_inspect_u64_hexadecimal (s_buf *buf, const u64 *u);
sw buf_inspect_u64_hexadecimal_size (const u64 *u);
-#endif /* ndef BUF_INSPECT_U64_hexadecimal_H */
+#endif /* LIBC3_BUF_INSPECT_U64_hexadecimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=64 bits=64 BASE=octal */
-#ifndef BUF_INSPECT_U64_octal_H
-#define BUF_INSPECT_U64_octal_H
+#ifndef LIBC3_BUF_INSPECT_U64_octal_H
+#define LIBC3_BUF_INSPECT_U64_octal_H
#include "types.h"
sw buf_inspect_u64_octal (s_buf *buf, const u64 *u);
sw buf_inspect_u64_octal_size (const u64 *u);
-#endif /* ndef BUF_INSPECT_U64_octal_H */
+#endif /* LIBC3_BUF_INSPECT_U64_octal_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u.h.in BITS=8 bits=8 */
-#ifndef BUF_INSPECT_U8_H
-#define BUF_INSPECT_U8_H
+#ifndef LIBC3_BUF_INSPECT_U8_H
+#define LIBC3_BUF_INSPECT_U8_H
#include "types.h"
@@ -24,4 +24,4 @@ sw buf_inspect_u8_base_size (const s_str *base,
const u8 *u);
sw buf_inspect_u8_size (const u8 *u);
-#endif /* ndef BUF_INSPECT_U8_H */
+#endif /* LIBC3_BUF_INSPECT_U8_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=8 bits=8 BASE=binary */
-#ifndef BUF_INSPECT_U8_binary_H
-#define BUF_INSPECT_U8_binary_H
+#ifndef LIBC3_BUF_INSPECT_U8_binary_H
+#define LIBC3_BUF_INSPECT_U8_binary_H
#include "types.h"
sw buf_inspect_u8_binary (s_buf *buf, const u8 *u);
sw buf_inspect_u8_binary_size (const u8 *u);
-#endif /* ndef BUF_INSPECT_U8_binary_H */
+#endif /* LIBC3_BUF_INSPECT_U8_binary_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=8 bits=8 BASE=decimal */
-#ifndef BUF_INSPECT_U8_decimal_H
-#define BUF_INSPECT_U8_decimal_H
+#ifndef LIBC3_BUF_INSPECT_U8_decimal_H
+#define LIBC3_BUF_INSPECT_U8_decimal_H
#include "types.h"
sw buf_inspect_u8_decimal (s_buf *buf, const u8 *u);
sw buf_inspect_u8_decimal_size (const u8 *u);
-#endif /* ndef BUF_INSPECT_U8_decimal_H */
+#endif /* LIBC3_BUF_INSPECT_U8_decimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=8 bits=8 BASE=hexadecimal */
-#ifndef BUF_INSPECT_U8_hexadecimal_H
-#define BUF_INSPECT_U8_hexadecimal_H
+#ifndef LIBC3_BUF_INSPECT_U8_hexadecimal_H
+#define LIBC3_BUF_INSPECT_U8_hexadecimal_H
#include "types.h"
sw buf_inspect_u8_hexadecimal (s_buf *buf, const u8 *u);
sw buf_inspect_u8_hexadecimal_size (const u8 *u);
-#endif /* ndef BUF_INSPECT_U8_hexadecimal_H */
+#endif /* LIBC3_BUF_INSPECT_U8_hexadecimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=8 bits=8 BASE=octal */
-#ifndef BUF_INSPECT_U8_octal_H
-#define BUF_INSPECT_U8_octal_H
+#ifndef LIBC3_BUF_INSPECT_U8_octal_H
+#define LIBC3_BUF_INSPECT_U8_octal_H
#include "types.h"
sw buf_inspect_u8_octal (s_buf *buf, const u8 *u);
sw buf_inspect_u8_octal_size (const u8 *u);
-#endif /* ndef BUF_INSPECT_U8_octal_H */
+#endif /* LIBC3_BUF_INSPECT_U8_octal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=_BITS$ bits=_bits$ BASE=_BASE$ */
-#ifndef BUF_INSPECT_U_BITS$__BASE$_H
-#define BUF_INSPECT_U_BITS$__BASE$_H
+#ifndef LIBC3_BUF_INSPECT_U_BITS$__BASE$_H
+#define LIBC3_BUF_INSPECT_U_BITS$__BASE$_H
#include "types.h"
sw buf_inspect_u_bits$__BASE$ (s_buf *buf, const u_bits$ *u);
sw buf_inspect_u_bits$__BASE$_size (const u_bits$ *u);
-#endif /* ndef BUF_INSPECT_U_BITS$__BASE$_H */
+#endif /* LIBC3_BUF_INSPECT_U_BITS$__BASE$_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u.h.in BITS=W bits=w */
-#ifndef BUF_INSPECT_UW_H
-#define BUF_INSPECT_UW_H
+#ifndef LIBC3_BUF_INSPECT_UW_H
+#define LIBC3_BUF_INSPECT_UW_H
#include "types.h"
@@ -24,4 +24,4 @@ sw buf_inspect_uw_base_size (const s_str *base,
const uw *u);
sw buf_inspect_uw_size (const uw *u);
-#endif /* ndef BUF_INSPECT_UW_H */
+#endif /* LIBC3_BUF_INSPECT_UW_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=W bits=w BASE=binary */
-#ifndef BUF_INSPECT_UW_binary_H
-#define BUF_INSPECT_UW_binary_H
+#ifndef LIBC3_BUF_INSPECT_UW_binary_H
+#define LIBC3_BUF_INSPECT_UW_binary_H
#include "types.h"
sw buf_inspect_uw_binary (s_buf *buf, const uw *u);
sw buf_inspect_uw_binary_size (const uw *u);
-#endif /* ndef BUF_INSPECT_UW_binary_H */
+#endif /* LIBC3_BUF_INSPECT_UW_binary_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=W bits=w BASE=decimal */
-#ifndef BUF_INSPECT_UW_decimal_H
-#define BUF_INSPECT_UW_decimal_H
+#ifndef LIBC3_BUF_INSPECT_UW_decimal_H
+#define LIBC3_BUF_INSPECT_UW_decimal_H
#include "types.h"
sw buf_inspect_uw_decimal (s_buf *buf, const uw *u);
sw buf_inspect_uw_decimal_size (const uw *u);
-#endif /* ndef BUF_INSPECT_UW_decimal_H */
+#endif /* LIBC3_BUF_INSPECT_UW_decimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=W bits=w BASE=hexadecimal */
-#ifndef BUF_INSPECT_UW_hexadecimal_H
-#define BUF_INSPECT_UW_hexadecimal_H
+#ifndef LIBC3_BUF_INSPECT_UW_hexadecimal_H
+#define LIBC3_BUF_INSPECT_UW_hexadecimal_H
#include "types.h"
sw buf_inspect_uw_hexadecimal (s_buf *buf, const uw *u);
sw buf_inspect_uw_hexadecimal_size (const uw *u);
-#endif /* ndef BUF_INSPECT_UW_hexadecimal_H */
+#endif /* LIBC3_BUF_INSPECT_UW_hexadecimal_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from buf_inspect_u_base.h.in BITS=W bits=w BASE=octal */
-#ifndef BUF_INSPECT_UW_octal_H
-#define BUF_INSPECT_UW_octal_H
+#ifndef LIBC3_BUF_INSPECT_UW_octal_H
+#define LIBC3_BUF_INSPECT_UW_octal_H
#include "types.h"
sw buf_inspect_uw_octal (s_buf *buf, const uw *u);
sw buf_inspect_uw_octal_size (const uw *u);
-#endif /* ndef BUF_INSPECT_UW_octal_H */
+#endif /* LIBC3_BUF_INSPECT_UW_octal_H */
@@ -16,8 +16,8 @@
*
* Structure to manipulate byte buffers.
*/
-#ifndef BUF_PARSE_H
-#define BUF_PARSE_H
+#ifndef LIBC3_BUF_PARSE_H
+#define LIBC3_BUF_PARSE_H
#include "buf_parse_s8.h"
#include "buf_parse_s16.h"
@@ -122,4 +122,4 @@ sw buf_parse_void (s_buf *buf, void *dest);
sw buf_peek_array_dimensions (s_buf *buf, s_array *dest);
-#endif /* BUF_PARSE_H */
+#endif /* LIBC3_BUF_PARSE_H */
deleted file mode 100644
@@ -1,72 +0,0 @@
-/* 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 "buf.h"
-#include "buf_parse_c.h"
-#include "buf_save.h"
-
-sw buf_parse_c_ident (s_buf *buf, const s_sym **dest)
-{
- (void) buf;
- (void) dest;
- return -1;
-}
-
-sw buf_parse_c_prototype (s_buf *buf, s_tuple *dest)
-{
- (void) buf;
- (void) dest;
- return -1;
-}
-
-sw buf_parse_c_type (s_buf *buf, s_sym_list **dest)
-{
- (void) buf;
- (void) dest;
- return -1;
-}
-
-sw buf_parse_c_typedef (s_buf *buf, s_c_typedef *dest)
-{
- sw r;
- sw result = 0;
- s_buf_save save;
- assert(buf);
- assert(dest);
- buf_save_init(buf, &save);
- if ((r = buf_read_1(buf, "typedef")) < 0)
- goto clean;
- result += r;
- if ((r = buf_ignore_spaces(buf)) <= 0)
- goto restore;
- result += r;
- if ((r = buf_parse_c_type(buf, &dest->type)) <= 0)
- goto restore;
- result += r;
- if ((r = buf_ignore_spaces(buf)) <= 0)
- goto restore;
- result += r;
- if ((r = buf_parse_c_ident(buf, &dest->ident)) <= 0)
- goto restore;
- result += r;
- if ((r = buf_ignore_spaces(buf)) < 0)
- goto restore;
- result += r;
- r = result;
- goto clean;
- restore:
- buf_save_restore_rpos(buf, &save);
- clean:
- buf_save_clean(buf, &save);
- return r;
-}
deleted file mode 100644
@@ -1,29 +0,0 @@
-/* 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.
- */
-/**
- * @file buf_parse_c.h
- * @brief Parse C.
- *
- * Functions to parse C from buf.
- */
-#ifndef BUF_PARSE_C_H
-#define BUF_PARSE_C_H
-
-#include "c_types.h"
-
-sw buf_parse_c_ident (s_buf *buf, const s_sym **dest);
-sw buf_parse_c_prototype (s_buf *buf, s_tuple *dest);
-sw buf_parse_c_type (s_buf *buf, s_sym_list **dest);
-sw buf_parse_c_typedef (s_buf *buf, s_c_typedef *dest);
-
-#endif /* BUF_PARSE_C_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_s.h.in BITS=_BITS$ bits=_bits$ */
-#ifndef BUF_PARSE_S_BITS$_H
-#define BUF_PARSE_S_BITS$_H
+#ifndef LIBC3_BUF_PARSE_S_BITS$_H
+#define LIBC3_BUF_PARSE_S_BITS$_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_s_bits$ (s_buf *buf, s_bits$ *dest);
sw buf_parse_s_bits$_base (s_buf *buf, const s_str *base,
bool negative, s_bits$ *dest);
-#endif /* #ifndef BUF_PARSE_S_BITS$_H */
+#endif /* LIBC3_BUF_PARSE_S_BITS$_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_s.h.in BITS=16 bits=16 */
-#ifndef BUF_PARSE_S16_H
-#define BUF_PARSE_S16_H
+#ifndef LIBC3_BUF_PARSE_S16_H
+#define LIBC3_BUF_PARSE_S16_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_s16 (s_buf *buf, s16 *dest);
sw buf_parse_s16_base (s_buf *buf, const s_str *base,
bool negative, s16 *dest);
-#endif /* #ifndef BUF_PARSE_S16_H */
+#endif /* LIBC3_BUF_PARSE_S16_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_s.h.in BITS=32 bits=32 */
-#ifndef BUF_PARSE_S32_H
-#define BUF_PARSE_S32_H
+#ifndef LIBC3_BUF_PARSE_S32_H
+#define LIBC3_BUF_PARSE_S32_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_s32 (s_buf *buf, s32 *dest);
sw buf_parse_s32_base (s_buf *buf, const s_str *base,
bool negative, s32 *dest);
-#endif /* #ifndef BUF_PARSE_S32_H */
+#endif /* LIBC3_BUF_PARSE_S32_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_s.h.in BITS=64 bits=64 */
-#ifndef BUF_PARSE_S64_H
-#define BUF_PARSE_S64_H
+#ifndef LIBC3_BUF_PARSE_S64_H
+#define LIBC3_BUF_PARSE_S64_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_s64 (s_buf *buf, s64 *dest);
sw buf_parse_s64_base (s_buf *buf, const s_str *base,
bool negative, s64 *dest);
-#endif /* #ifndef BUF_PARSE_S64_H */
+#endif /* LIBC3_BUF_PARSE_S64_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_s.h.in BITS=8 bits=8 */
-#ifndef BUF_PARSE_S8_H
-#define BUF_PARSE_S8_H
+#ifndef LIBC3_BUF_PARSE_S8_H
+#define LIBC3_BUF_PARSE_S8_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_s8 (s_buf *buf, s8 *dest);
sw buf_parse_s8_base (s_buf *buf, const s_str *base,
bool negative, s8 *dest);
-#endif /* #ifndef BUF_PARSE_S8_H */
+#endif /* LIBC3_BUF_PARSE_S8_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_s.h.in BITS=W bits=w */
-#ifndef BUF_PARSE_SW_H
-#define BUF_PARSE_SW_H
+#ifndef LIBC3_BUF_PARSE_SW_H
+#define LIBC3_BUF_PARSE_SW_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_sw (s_buf *buf, sw *dest);
sw buf_parse_sw_base (s_buf *buf, const s_str *base,
bool negative, sw *dest);
-#endif /* #ifndef BUF_PARSE_SW_H */
+#endif /* LIBC3_BUF_PARSE_SW_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_u.h.in BITS=_BITS$ bits=_bits$ */
-#ifndef BUF_PARSE_U_BITS$_H
-#define BUF_PARSE_U_BITS$_H
+#ifndef LIBC3_BUF_PARSE_U_BITS$_H
+#define LIBC3_BUF_PARSE_U_BITS$_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_u_bits$ (s_buf *buf, u_bits$ *dest);
sw buf_parse_u_bits$_base (s_buf *buf, const s_str *base,
u_bits$ *dest);
-#endif /* #ifndef BUF_PARSE_U_BITS$_H */
+#endif /* LIBC3_BUF_PARSE_U_BITS$_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_u.h.in BITS=16 bits=16 */
-#ifndef BUF_PARSE_U16_H
-#define BUF_PARSE_U16_H
+#ifndef LIBC3_BUF_PARSE_U16_H
+#define LIBC3_BUF_PARSE_U16_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_u16 (s_buf *buf, u16 *dest);
sw buf_parse_u16_base (s_buf *buf, const s_str *base,
u16 *dest);
-#endif /* #ifndef BUF_PARSE_U16_H */
+#endif /* LIBC3_BUF_PARSE_U16_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_u.h.in BITS=32 bits=32 */
-#ifndef BUF_PARSE_U32_H
-#define BUF_PARSE_U32_H
+#ifndef LIBC3_BUF_PARSE_U32_H
+#define LIBC3_BUF_PARSE_U32_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_u32 (s_buf *buf, u32 *dest);
sw buf_parse_u32_base (s_buf *buf, const s_str *base,
u32 *dest);
-#endif /* #ifndef BUF_PARSE_U32_H */
+#endif /* LIBC3_BUF_PARSE_U32_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_u.h.in BITS=64 bits=64 */
-#ifndef BUF_PARSE_U64_H
-#define BUF_PARSE_U64_H
+#ifndef LIBC3_BUF_PARSE_U64_H
+#define LIBC3_BUF_PARSE_U64_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_u64 (s_buf *buf, u64 *dest);
sw buf_parse_u64_base (s_buf *buf, const s_str *base,
u64 *dest);
-#endif /* #ifndef BUF_PARSE_U64_H */
+#endif /* LIBC3_BUF_PARSE_U64_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_u.h.in BITS=8 bits=8 */
-#ifndef BUF_PARSE_U8_H
-#define BUF_PARSE_U8_H
+#ifndef LIBC3_BUF_PARSE_U8_H
+#define LIBC3_BUF_PARSE_U8_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_u8 (s_buf *buf, u8 *dest);
sw buf_parse_u8_base (s_buf *buf, const s_str *base,
u8 *dest);
-#endif /* #ifndef BUF_PARSE_U8_H */
+#endif /* LIBC3_BUF_PARSE_U8_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from buf_parse_u.h.in BITS=W bits=w */
-#ifndef BUF_PARSE_UW_H
-#define BUF_PARSE_UW_H
+#ifndef LIBC3_BUF_PARSE_UW_H
+#define LIBC3_BUF_PARSE_UW_H
#include "types.h"
@@ -20,4 +20,4 @@ sw buf_parse_uw (s_buf *buf, uw *dest);
sw buf_parse_uw_base (s_buf *buf, const s_str *base,
uw *dest);
-#endif /* #ifndef BUF_PARSE_UW_H */
+#endif /* LIBC3_BUF_PARSE_UW_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef BUF_SAVE_H
-#define BUF_SAVE_H
+#ifndef LIBC3_BUF_SAVE_H
+#define LIBC3_BUF_SAVE_H
#include "types.h"
@@ -22,4 +22,4 @@ uw buf_save_min_wpos (const s_buf *buf);
s_buf * buf_save_restore_rpos (s_buf *buf, const s_buf_save *save);
s_buf * buf_save_restore_wpos (s_buf *buf, const s_buf_save *save);
-#endif /* BUF_SAVE */
+#endif /* LIBC3_BUF_SAVE */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef C3_H
-#define C3_H
+#ifndef LIBC3_C3_H
+#define LIBC3_C3_H
#include "arg.h"
#include "array.h"
@@ -74,4 +74,4 @@
#include "type.h"
#include "ucd.h"
-#endif /* C3_H */
+#endif /* LIBC3_C3_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef C3_MAIN_H
-#define C3_MAIN_H
+#ifndef LIBC3_C3_MAIN_H
+#define LIBC3_C3_MAIN_H
#include "types.h"
@@ -32,4 +32,4 @@ void c3_clean (s_env *env);
/* debug */
void c3_break (void);
-#endif /* C3_MAIN_H */
+#endif /* LIBC3_C3_MAIN_H */
deleted file mode 100644
@@ -1,25 +0,0 @@
-/* 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 C_TYPES_H
-#define C_TYPES_H
-
-#include "types.h"
-
-typedef s_sym_list * p_c_type;
-
-typedef struct c_typedef {
- p_c_type type;
- const s_sym *ident;
-} s_c_typedef;
-
-#endif /* C_TYPES_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef CALL_H
-#define CALL_H
+#ifndef LIBC3_CALL_H
+#define LIBC3_CALL_H
#include "types.h"
@@ -31,4 +31,4 @@ bool call_get (s_call *call, s_facts *facts);
s_call * call_copy (const s_call *src, s_call *dest);
s_str * call_inspect (const s_call *call, s_str *dest);
-#endif /* CALL_H */
+#endif /* LIBC3_CALL_H */
@@ -17,8 +17,8 @@
* Functions that return the ceiling of a number divided by another
* number.
*/
-#ifndef CEILING_H
-#define CEILING_H
+#ifndef LIBC3_CEILING_H
+#define LIBC3_CEILING_H
#include "types.h"
@@ -36,4 +36,4 @@ DEF_CEILING_PROTOTYPE(u32);
DEF_CEILING_PROTOTYPE(u64);
DEF_CEILING_PROTOTYPE(uw);
-#endif /* CEILING_H */
+#endif /* LIBC3_CEILING_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef CFN_H
-#define CFN_H
+#ifndef LIBC3_CFN_H
+#define LIBC3_CFN_H
#include "types.h"
@@ -32,4 +32,4 @@ s_cfn * cfn_copy (const s_cfn *cfn, s_cfn *dest);
s_cfn * cfn_link (s_cfn *cfn);
s_cfn * cfn_prep_cif (s_cfn *cfn);
-#endif /* CFN_H */
+#endif /* LIBC3_CFN_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef CHARACTER_H
-#define CHARACTER_H
+#ifndef LIBC3_CHARACTER_H
+#define LIBC3_CHARACTER_H
#include "hash.h"
#include "types.h"
@@ -32,4 +32,4 @@ sw character_write (s_buf *buf, character c);
sw character_utf8 (character c, s8 *dest);
sw character_utf8_size (character c);
-#endif /* CHARACTER_H */
+#endif /* LIBC3_CHARACTER_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef COMPARE_H
-#define COMPARE_H
+#ifndef LIBC3_COMPARE_H
+#define LIBC3_COMPARE_H
#include "types.h"
@@ -51,4 +51,4 @@ COMPARE_PROTOTYPE(u16);
COMPARE_PROTOTYPE(u32);
COMPARE_PROTOTYPE(u64);
-#endif /* COMPARE_H */
+#endif /* LIBC3_COMPARE_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef ERROR_H
-#define ERROR_H
+#ifndef LIBC3_ERROR_H
+#define LIBC3_ERROR_H
#include "types.h"
@@ -24,4 +24,4 @@
void error_print (s_buf *buf, const s_error_handler *error_handler);
void error_print_backtrace (s_buf *buf, const s_list *backtrace);
-#endif /* ERROR_H */
+#endif /* LIBC3_ERROR_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef ERROR_HANDLER_H
-#define ERROR_HANDLER_H
+#ifndef LIBC3_ERROR_HANDLER_H
+#define LIBC3_ERROR_HANDLER_H
#include "types.h"
@@ -27,4 +27,4 @@ s_error_handler * error_handler_new (s_error_handler *next);
s_error_handler * error_handler_delete (s_error_handler *error_handler);
void error_handler_delete_all (s_error_handler *error_handler);
-#endif /* ERROR_HANDLER_H */
+#endif /* LIBC3_ERROR_HANDLER_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef EVAL_H
-#define EVAL_H
+#ifndef LIBC3_EVAL_H
+#define LIBC3_EVAL_H
#include "types.h"
@@ -23,4 +23,4 @@ bool eval_ident (const s_ident *ident, s_tag *dest);
bool eval_progn (const s_list *program, s_tag *dest);
bool eval_tag (const s_tag *tag, s_tag *dest);
-#endif /* EVAL_H */
+#endif /* LIBC3_EVAL_H */
@@ -10,12 +10,12 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef F32_H
-#define F32_H
+#ifndef LIBC3_F32_H
+#define LIBC3_F32_H
#include "types.h"
f32 f32_cast (s_tag *tag);
f32 * f32_copy (const f32 *src, f32 *dest);
-#endif /* F32_H */
+#endif /* LIBC3_F32_H */
@@ -10,12 +10,12 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef F64_H
-#define F64_H
+#ifndef LIBC3_F64_H
+#define LIBC3_F64_H
#include "types.h"
f64 f64_cast (s_tag *tag);
f64 * f64_copy (const f64 *src, f64 *dest);
-#endif /* F64_H */
+#endif /* LIBC3_F64_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef FACT_H
-#define FACT_H
+#ifndef LIBC3_FACT_H
+#define LIBC3_FACT_H
#include "types.h"
@@ -29,4 +29,4 @@ s_fact * fact_r (const s_fact_w *fact);
/* Modifiers */
void fact_w_clean (s_fact_w *fact);
-#endif /* FACT_H */
+#endif /* LIBC3_FACT_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef FACTS_H
-#define FACTS_H
+#ifndef LIBC3_FACTS_H
+#define LIBC3_FACTS_H
#include "types.h"
@@ -64,4 +64,4 @@ s_tag * facts_find_tag (s_facts *facts, const s_tag *tag);
sw facts_log_add (s_log *log, const s_fact *fact);
sw facts_log_remove (s_log *log, const s_fact *fact);
-#endif /* FACTS_H */
+#endif /* LIBC3_FACTS_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef FACTS_CURSOR_H
-#define FACTS_CURSOR_H
+#ifndef LIBC3_FACTS_CURSOR_H
+#define LIBC3_FACTS_CURSOR_H
#include "types.h"
@@ -30,4 +30,4 @@ s_facts_cursor * facts_cursor_lock_init (s_facts_cursor *cursor);
s_facts_cursor * facts_cursor_lock_unlock (s_facts_cursor *cursor);
s_fact * facts_cursor_next (s_facts_cursor *cursor);
-#endif /* FACTS_H */
+#endif /* LIBC3_FACTS_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef FACTS_SPEC_H
-#define FACTS_SPEC_H
+#ifndef LIBC3_FACTS_SPEC_H
+#define LIBC3_FACTS_SPEC_H
#include "types.h"
@@ -39,4 +39,4 @@ uw facts_spec_count_facts (p_facts_spec spec);
/* Modifiers */
p_facts_spec facts_spec_sort (p_facts_spec spec);
-#endif /* FACTS_SPEC_H */
+#endif /* LIBC3_FACTS_SPEC_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef FACTS_SPEC_CURSOR_H
-#define FACTS_SPEC_CURSOR_H
+#ifndef LIBC3_FACTS_SPEC_CURSOR_H
+#define LIBC3_FACTS_SPEC_CURSOR_H
#include "types.h"
@@ -22,4 +22,4 @@ facts_spec_cursor_init (s_facts_spec_cursor *cursor,
bool facts_spec_cursor_next (s_facts_spec_cursor *cursor,
s_fact *fact);
-#endif /* FACTS_SPEC_CURSOR_H */
+#endif /* LIBC3_FACTS_SPEC_CURSOR_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef FACTS_WITH_H
-#define FACTS_WITH_H
+#ifndef LIBC3_FACTS_WITH_H
+#define LIBC3_FACTS_WITH_H
#include "types.h"
@@ -46,4 +46,4 @@ s_facts_cursor * facts_with_tags (s_facts *facts,
s_tag *predicate,
s_tag *object);
-#endif /* FACTS_WITH_H */
+#endif /* LIBC3_FACTS_WITH_H */
@@ -10,12 +10,12 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef FACTS_WITH_CURSOR_H
-#define FACTS_WITH_CURSOR_H
+#ifndef LIBC3_FACTS_WITH_CURSOR_H
+#define LIBC3_FACTS_WITH_CURSOR_H
#include "types.h"
void facts_with_cursor_clean (s_facts_with_cursor *cursor);
s_fact * facts_with_cursor_next (s_facts_with_cursor *cursor);
-#endif /* FACTS_WITH_CURSOR_H */
+#endif /* LIBC3_FACTS_WITH_CURSOR_H */
@@ -16,8 +16,8 @@
*
* Structure to manipulate files.
*/
-#ifndef FILE_H
-#define FILE_H
+#ifndef LIBC3_FILE_H
+#define LIBC3_FILE_H
#include "types.h"
@@ -25,4 +25,4 @@
int file_copy (const char *from, const char *to);
s_tag * file_mtime (const s_str *path, s_tag *dest);
-#endif /* FILE_H */
+#endif /* LIBC3_FILE_H */
@@ -22,8 +22,8 @@
* All operations are supported in tag_add, tag_mul, tag_neg etc.
*
*/
-#ifndef FLOAT_H
-#define FLOAT_H
+#ifndef LIBC3_FLOAT_H
+#define LIBC3_FLOAT_H
#include "types.h"
@@ -50,4 +50,4 @@ s_float * float_sq (const s_float *f, s_float *result);
s_float * float_sqrt (const s_float *f, s_float *result);
s_float * float_sub (const s_float *a, s_float *b, s_float *result);
-#endif /* FLOAT_H */
+#endif /* LIBC3_FLOAT_H */
@@ -16,8 +16,8 @@
*
* Syntax : "fn" (type? "(" ((type space)? sym ","?)* ")" "{" prog "}")+
*/
-#ifndef FN_H
-#define FN_H
+#ifndef LIBC3_FN_H
+#define LIBC3_FN_H
#include "types.h"
@@ -36,4 +36,4 @@ void fn_delete (s_fn *fn);
/* observers */
s_fn * fn_copy (const s_fn *src, s_fn *dest);
-#endif /* FN_H */
+#endif /* LIBC3_FN_H */
@@ -16,8 +16,8 @@
*
* Syntax : "fn" (type? "(" ((type space)? sym ","?)* ")" "{" prog "}")+
*/
-#ifndef FN_CLAUSE_H
-#define FN_CLAUSE_H
+#ifndef LIBC3_FN_CLAUSE_H
+#define LIBC3_FN_CLAUSE_H
#include "types.h"
@@ -35,4 +35,4 @@ void fn_clause_delete_all (s_fn_clause *clause);
/* modifiers */
s_fn_clause * fn_clause_copy (const s_fn_clause *src, s_fn_clause **dest);
-#endif /* FN_H */
+#endif /* LIBC3_FN_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef FRAME_H
-#define FRAME_H
+#ifndef LIBC3_FRAME_H
+#define LIBC3_FRAME_H
#include "types.h"
@@ -33,4 +33,4 @@ void frame_binding_new(s_frame *frame, const s_sym *name,
/* observers */
const s_tag * frame_get (const s_frame *frame, const s_sym *sym);
-#endif /* FRAME_H */
+#endif /* LIBC3_FRAME_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef HASH_H
-#define HASH_H
+#ifndef LIBC3_HASH_H
+#define LIBC3_HASH_H
#include "types.h"
@@ -55,4 +55,4 @@ HASH_UPDATE_PROTOTYPE(u32);
HASH_UPDATE_PROTOTYPE(u64);
HASH_UPDATE_PROTOTYPE(uw);
-#endif /* HASH_H */
+#endif /* LIBC3_HASH_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef IDENT_H
-#define IDENT_H
+#ifndef LIBC3_IDENT_H
+#define LIBC3_IDENT_H
#include "sym.h"
#include "types.h"
@@ -46,4 +46,4 @@ s_str * ident_inspect (const s_ident *ident, s_str *dest);
bool ident_to_tag_type (const s_ident *ident, e_tag_type *dest);
-#endif
+#endif /* LIBC3_IDENT_H */
@@ -16,8 +16,8 @@
*
* Structure to manipulate byte strings.
*/
-#ifndef INTEGER_H
-#define INTEGER_H
+#ifndef LIBC3_INTEGER_H
+#define LIBC3_INTEGER_H
#include <stdarg.h>
#include <stdio.h>
@@ -106,4 +106,4 @@ u32 integer_to_u32 (const s_integer *i);
u64 integer_to_u64 (const s_integer *i);
uw integer_to_uw (const s_integer *i);
-#endif /* INTEGER_H */
+#endif /* LIBC3_INTEGER_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef IO_H
-#define IO_H
+#ifndef LIBC3_IO_H
+#define LIBC3_IO_H
#include "types.h"
@@ -25,4 +25,4 @@ sw err_puts (const s8 *s);
sw io_inspect (const s_tag *tag);
sw io_puts (const s8 *s);
-#endif /* IO_H */
+#endif /* LIBC3_IO_H */
@@ -16,8 +16,8 @@
*
* Linked list of tags.
*/
-#ifndef LIST_H
-#define LIST_H
+#ifndef LIBC3_LIST_H
+#define LIBC3_LIST_H
#include <stdarg.h>
#include <stdio.h>
@@ -46,4 +46,4 @@ s_tuple * list_to_tuple_reverse (const s_list *list, s_tuple *dest);
/* Call str_delete after use. */
s_str * list_inspect (const s_list *list, s_str *dest);
-#endif /* STR_H */
+#endif /* LIBC3_LIST_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef LOG_H
-#define LOG_H
+#ifndef LIBC3_LOG_H
+#define LIBC3_LOG_H
#include "types.h"
@@ -29,4 +29,4 @@ void log_delete (s_log *log);
void log_close (s_log *log);
sw log_open (s_log *log, FILE *fp);
-#endif /* C3_H */
+#endif /* LIBC3_LOG_H */
@@ -17,8 +17,8 @@
* Structure to manipulate modules.
* A module contains symbols which have a type and an optional value.
*/
-#ifndef MODULE_H
-#define MODULE_H
+#ifndef LIBC3_MODULE_H
+#define LIBC3_MODULE_H
#include "types.h"
@@ -40,4 +40,4 @@ bool module_defmodule (const s_sym *name, const s_quote *block);
bool module_def (const s_sym *module, const s_sym *name,
const s_quote *block);
-#endif /* MODULE_H */
+#endif /* LIBC3_MODULE_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef OPERATOR_H
-#define OPERATOR_H
+#ifndef LIBC3_OPERATOR_H
+#define LIBC3_OPERATOR_H
#include "types.h"
@@ -25,4 +25,4 @@ s_ident * operator_resolve (const s_ident *ident, u8 arity,
s_ident *dest);
const s_sym * operator_symbol (const s_ident *op);
-#endif /* OPERATOR_H */
+#endif /* LIBC3_OPERATOR_H */
@@ -10,11 +10,11 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef PTAG_H
-#define PTAG_H
+#ifndef LIBC3_PTAG_H
+#define LIBC3_PTAG_H
#include "types.h"
p_tag * ptag_copy (const p_tag *src, p_tag *dest);
-#endif /* PTAG_H */
+#endif /* LIBC3_PTAG_H */
@@ -10,12 +10,12 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef QUOTE_H
-#define QUOTE_H
+#ifndef LIBC3_QUOTE_H
+#define LIBC3_QUOTE_H
#include "types.h"
void quote_clean (s_quote *quote);
s_quote * quote_copy (const s_quote *src, s_quote *dest);
-#endif /* QUOTE_H */
+#endif /* LIBC3_QUOTE_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from s.h.in BITS=_BITS$ bits=_bits$ */
-#ifndef S_BITS$_H
-#define S_BITS$_H
+#ifndef LIBC3_S_BITS$_H
+#define LIBC3_S_BITS$_H
#include "types.h"
s_bits$ * s_bits$_cast (s_tag *tag, s_bits$ *dest);
s_bits$ * s_bits$_copy (const s_bits$ *src, s_bits$ *dest);
-#endif /* S8_H */
+#endif /* LIBC3_S_BITS$_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from s.h.in BITS=16 bits=16 */
-#ifndef S16_H
-#define S16_H
+#ifndef LIBC3_S16_H
+#define LIBC3_S16_H
#include "types.h"
s16 * s16_cast (s_tag *tag, s16 *dest);
s16 * s16_copy (const s16 *src, s16 *dest);
-#endif /* S8_H */
+#endif /* LIBC3_S16_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from s.h.in BITS=32 bits=32 */
-#ifndef S32_H
-#define S32_H
+#ifndef LIBC3_S32_H
+#define LIBC3_S32_H
#include "types.h"
s32 * s32_cast (s_tag *tag, s32 *dest);
s32 * s32_copy (const s32 *src, s32 *dest);
-#endif /* S8_H */
+#endif /* LIBC3_S32_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from s.h.in BITS=64 bits=64 */
-#ifndef S64_H
-#define S64_H
+#ifndef LIBC3_S64_H
+#define LIBC3_S64_H
#include "types.h"
s64 * s64_cast (s_tag *tag, s64 *dest);
s64 * s64_copy (const s64 *src, s64 *dest);
-#endif /* S8_H */
+#endif /* LIBC3_S64_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from s.h.in BITS=8 bits=8 */
-#ifndef S8_H
-#define S8_H
+#ifndef LIBC3_S8_H
+#define LIBC3_S8_H
#include "types.h"
s8 * s8_cast (s_tag *tag, s8 *dest);
s8 * s8_copy (const s8 *src, s8 *dest);
-#endif /* S8_H */
+#endif /* LIBC3_S8_H */
@@ -10,12 +10,12 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef SEQUENCE_H
-#define SEQUENCE_H
+#ifndef LIBC3_SEQUENCE_H
+#define LIBC3_SEQUENCE_H
#include "types.h"
s_sequence * sequence_init (s_sequence *sequence, f64 duration,
const s8 *title);
-#endif /* ndef SEQUENCE_H */
+#endif /* LIBC3_SEQUENCE_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from set.h.in NAME=_NAME$ TYPE=_TYPE$ */
-#ifndef SET___NAME$_H
-#define SET___NAME$_H
+#ifndef LIBC3_SET___NAME$_H
+#define LIBC3_SET___NAME$_H
#include "types.h"
@@ -52,4 +52,4 @@ set_remove_item___NAME$ (s_set___NAME$ *set, s_set_item___NAME$ *item);
s_set___NAME$ *
set_resize___NAME$ (s_set___NAME$ *set, uw max);
-#endif /* SET___NAME$_H */
+#endif /* LIBC3_SET___NAME$_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from set.h.in NAME=fact TYPE=s_fact */
-#ifndef SET__fact_H
-#define SET__fact_H
+#ifndef LIBC3_SET__fact_H
+#define LIBC3_SET__fact_H
#include "types.h"
@@ -52,4 +52,4 @@ set_remove_item__fact (s_set__fact *set, s_set_item__fact *item);
s_set__fact *
set_resize__fact (s_set__fact *set, uw max);
-#endif /* SET__fact_H */
+#endif /* LIBC3_SET__fact_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from set.h.in NAME=tag TYPE=s_tag */
-#ifndef SET__tag_H
-#define SET__tag_H
+#ifndef LIBC3_SET__tag_H
+#define LIBC3_SET__tag_H
#include "types.h"
@@ -52,4 +52,4 @@ set_remove_item__tag (s_set__tag *set, s_set_item__tag *item);
s_set__tag *
set_resize__tag (s_set__tag *set, uw max);
-#endif /* SET__tag_H */
+#endif /* LIBC3_SET__tag_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from set_cursor.h.in NAME=_NAME$ TYPE=_TYPE$ */
-#ifndef SET_CURSOR___NAME$_H
-#define SET_CURSOR___NAME$_H
+#ifndef LIBC3_SET_CURSOR___NAME$_H
+#define LIBC3_SET_CURSOR___NAME$_H
#include "types.h"
@@ -22,4 +22,4 @@ set_cursor_init___NAME$ (s_set___NAME$ *set, s_set_cursor___NAME$ *c);
s_set_item___NAME$ *
set_cursor_next___NAME$ (s_set_cursor___NAME$ *c);
-#endif /* SET_CURSOR___NAME$_H */
+#endif /* LIBC3_SET_CURSOR___NAME$_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from set_cursor.h.in NAME=fact TYPE=s_fact */
-#ifndef SET_CURSOR__fact_H
-#define SET_CURSOR__fact_H
+#ifndef LIBC3_SET_CURSOR__fact_H
+#define LIBC3_SET_CURSOR__fact_H
#include "types.h"
@@ -22,4 +22,4 @@ set_cursor_init__fact (s_set__fact *set, s_set_cursor__fact *c);
s_set_item__fact *
set_cursor_next__fact (s_set_cursor__fact *c);
-#endif /* SET_CURSOR__fact_H */
+#endif /* LIBC3_SET_CURSOR__fact_H */
@@ -11,8 +11,8 @@
* THIS SOFTWARE.
*/
/* Gen from set_cursor.h.in NAME=tag TYPE=s_tag */
-#ifndef SET_CURSOR__tag_H
-#define SET_CURSOR__tag_H
+#ifndef LIBC3_SET_CURSOR__tag_H
+#define LIBC3_SET_CURSOR__tag_H
#include "types.h"
@@ -22,4 +22,4 @@ set_cursor_init__tag (s_set__tag *set, s_set_cursor__tag *c);
s_set_item__tag *
set_cursor_next__tag (s_set_cursor__tag *c);
-#endif /* SET_CURSOR__tag_H */
+#endif /* LIBC3_SET_CURSOR__tag_H */
@@ -17,8 +17,8 @@
*
* Data structure for set items containing _TYPE$.
*/
-#ifndef SET_ITEM___NAME$_H
-#define SET_ITEM___NAME$_H
+#ifndef LIBC3_SET_ITEM___NAME$_H
+#define LIBC3_SET_ITEM___NAME$_H
#include "types.h"
@@ -31,4 +31,4 @@ set_item_delete___NAME$ (s_set_item___NAME$ *x);
void
set_item_delete_all___NAME$ (s_set_item___NAME$ *x);
-#endif /* SET_ITEM___NAME$_H */
+#endif /* LIBC3_SET_ITEM___NAME$_H */
@@ -17,8 +17,8 @@
*
* Data structure for set items containing s_fact.
*/
-#ifndef SET_ITEM__fact_H
-#define SET_ITEM__fact_H
+#ifndef LIBC3_SET_ITEM__fact_H
+#define LIBC3_SET_ITEM__fact_H
#include "types.h"
@@ -31,4 +31,4 @@ set_item_delete__fact (s_set_item__fact *x);
void
set_item_delete_all__fact (s_set_item__fact *x);
-#endif /* SET_ITEM__fact_H */
+#endif /* LIBC3_SET_ITEM__fact_H */
@@ -17,8 +17,8 @@
*
* Data structure for set items containing s_tag.
*/
-#ifndef SET_ITEM__tag_H
-#define SET_ITEM__tag_H
+#ifndef LIBC3_SET_ITEM__tag_H
+#define LIBC3_SET_ITEM__tag_H
#include "types.h"
@@ -31,4 +31,4 @@ set_item_delete__tag (s_set_item__tag *x);
void
set_item_delete_all__tag (s_set_item__tag *x);
-#endif /* SET_ITEM__tag_H */
+#endif /* LIBC3_SET_ITEM__tag_H */
@@ -16,8 +16,8 @@
*
* Functions that return the sign of a number.
*/
-#ifndef SIGN_H
-#define SIGN_H
+#ifndef LIBC3_SIGN_H
+#define LIBC3_SIGN_H
#include "types.h"
@@ -35,4 +35,4 @@ DEF_SIGN_PROTOTYPE(u32);
DEF_SIGN_PROTOTYPE(u64);
DEF_SIGN_PROTOTYPE(uw);
-#endif /* SIGN_H */
+#endif /* LIBC3_SIGN_H */
@@ -17,8 +17,8 @@
*
* Skiplist containing _TYPE$.
*/
-#ifndef SKIPLIST___NAME$_H
-#define SKIPLIST___NAME$_H
+#ifndef LIBC3_SKIPLIST___NAME$_H
+#define LIBC3_SKIPLIST___NAME$_H
#include "types.h"
@@ -56,4 +56,4 @@ skiplist_random_height___NAME$ (s_skiplist___NAME$ *skiplist);
bool
skiplist_remove___NAME$ (s_skiplist___NAME$ *skiplist, _TYPE$ value);
-#endif /* SKIPLIST___NAME$_H */
+#endif /* LIBC3_SKIPLIST___NAME$_H */
@@ -17,8 +17,8 @@
*
* Skiplist containing s_fact *.
*/
-#ifndef SKIPLIST__fact_H
-#define SKIPLIST__fact_H
+#ifndef LIBC3_SKIPLIST__fact_H
+#define LIBC3_SKIPLIST__fact_H
#include "types.h"
@@ -56,4 +56,4 @@ skiplist_random_height__fact (s_skiplist__fact *skiplist);
bool
skiplist_remove__fact (s_skiplist__fact *skiplist, s_fact * value);
-#endif /* SKIPLIST__fact_H */
+#endif /* LIBC3_SKIPLIST__fact_H */
@@ -17,8 +17,8 @@
*
* Data structure for skiplist nodes containing _TYPE$.
*/
-#ifndef SKIPLIST_NODE___NAME$_H
-#define SKIPLIST_NODE___NAME$_H
+#ifndef LIBC3_SKIPLIST_NODE___NAME$_H
+#define LIBC3_SKIPLIST_NODE___NAME$_H
#include "types.h"
@@ -43,4 +43,4 @@ skiplist_node_delete___NAME$ (s_skiplist_node___NAME$ *node);
void
skiplist_node_insert___NAME$ (s_skiplist_node___NAME$ *node, s_skiplist_node___NAME$ *pred);
-#endif /* SKIPLIST_NODE___NAME$_H */
+#endif /* LIBC3_SKIPLIST_NODE___NAME$_H */
@@ -17,8 +17,8 @@
*
* Data structure for skiplist nodes containing s_fact *.
*/
-#ifndef SKIPLIST_NODE__fact_H
-#define SKIPLIST_NODE__fact_H
+#ifndef LIBC3_SKIPLIST_NODE__fact_H
+#define LIBC3_SKIPLIST_NODE__fact_H
#include "types.h"
@@ -43,4 +43,4 @@ skiplist_node_delete__fact (s_skiplist_node__fact *node);
void
skiplist_node_insert__fact (s_skiplist_node__fact *node, s_skiplist_node__fact *pred);
-#endif /* SKIPLIST_NODE__fact_H */
+#endif /* LIBC3_SKIPLIST_NODE__fact_H */
@@ -16,8 +16,8 @@
*
* Structure to manipulate byte strings.
*/
-#ifndef STR_H
-#define STR_H
+#ifndef LIBC3_STR_H
+#define LIBC3_STR_H
#include <stdarg.h>
#include <stdio.h>
@@ -83,4 +83,4 @@ const s_sym * str_to_sym (const s_str *src);
sw str_read_u8 (s_str *str, u8 *p);
sw str_read_character_utf8 (s_str *str, character *c);
-#endif /* STR_H */
+#endif /* LIBC3_STR_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from s.h.in BITS=W bits=w */
-#ifndef SW_H
-#define SW_H
+#ifndef LIBC3_SW_H
+#define LIBC3_SW_H
#include "types.h"
sw * sw_cast (s_tag *tag, sw *dest);
sw * sw_copy (const sw *src, sw *dest);
-#endif /* S8_H */
+#endif /* LIBC3_SW_H */
@@ -19,8 +19,8 @@
* They are allocated once and only free'd at the end of the program.
* Comparing symbols is fast : it's a pointer comparison.
*/
-#ifndef SYM_H
-#define SYM_H
+#ifndef LIBC3_SYM_H
+#define LIBC3_SYM_H
#include "types.h"
@@ -54,4 +54,4 @@ ffi_type * sym_to_ffi_type (const s_sym *sym, ffi_type *result_type);
bool sym_to_tag_type (const s_sym *sym, e_tag_type *dest);
-#endif /* SYM_H */
+#endif /* LIBC3_SYM_H */
@@ -16,8 +16,8 @@
*
* Structure to add a type tag to data.
*/
-#ifndef TAG_H
-#define TAG_H
+#ifndef LIBC3_TAG_H
+#define LIBC3_TAG_H
#include <stdarg.h>
#include <stdio.h>
@@ -179,4 +179,4 @@ s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *dest);
s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *dest);
s_tag * tag_sub (const s_tag *a, const s_tag *b, s_tag *dest);
-#endif /* STR_H */
+#endif /* LIBC3_TAG_H */
deleted file mode 100644
@@ -1,24 +0,0 @@
-/* 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 "tag.h"
-#include "timespec.h"
-
-s_tag * timespec_to_tag (const struct timespec *time, s_tag *dest)
-{
- s_tag tmp;
- tag_init_tuple(&tmp, 2);
- tag_init_s64(&tmp.data.tuple.tag[0], time->tv_sec);
- tag_init_s64(&tmp.data.tuple.tag[1], time->tv_nsec);
- *dest = tmp;
- return dest;
-}
deleted file mode 100644
@@ -1,28 +0,0 @@
-/* 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.
- */
-/**
- * @file timespec.h
- * @brief operations on struct timespec
- *
- * Struct timespec
- */
-#ifndef TIMESPEC_H
-#define TIMESPEC_H
-
-#include <time.h>
-#include "types.h"
-
-/* Observers */
-s_tag * timespec_to_tag (const struct timespec *time, s_tag *dest);
-
-#endif /* TIMESPEC_H */
@@ -16,8 +16,8 @@
*
* A tuple is a static array of tags.
*/
-#ifndef TUPLE_H
-#define TUPLE_H
+#ifndef LIBC3_TUPLE_H
+#define LIBC3_TUPLE_H
#include "hash.h"
#include "types.h"
@@ -44,4 +44,4 @@ s_list * tuple_to_list (const s_tuple *tuple, s_list **list);
/* Call str_delete after use. */
s_str * tuple_inspect (const s_tuple *x, s_str *dest);
-#endif /* STR_H */
+#endif /* LIBC3_TUPLE_H */
@@ -16,11 +16,11 @@
*
* Structure to manipulate C3 type.
*/
-#ifndef TYPE_H
-#define TYPE_H
+#ifndef LIBC3_TYPE_H
+#define LIBC3_TYPE_H
#include "types.h"
const s_sym * type_pointer (const s_sym *type);
-#endif /* TYPE_H */
+#endif /* LIBC3_TYPE_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef TYPES_H
-#define TYPES_H
+#ifndef LIBC3_TYPES_H
+#define LIBC3_TYPES_H
#include <ffi.h>
#include <limits.h>
@@ -565,4 +565,4 @@ struct facts_with_cursor {
pthread_mutex_t mutex;
};
-#endif /* TYPES_H */
+#endif /* LIBC3_TYPES_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from u.h.in BITS=_BITS$ bits=_bits$ */
-#ifndef U_BITS$_H
-#define U_BITS$_H
+#ifndef LIBC3_U_BITS$_H
+#define LIBC3_U_BITS$_H
#include "types.h"
u_bits$ * u_bits$_cast (s_tag *tag, u_bits$ *dest);
u_bits$ * u_bits$_copy (const u_bits$ *src, u_bits$ *dest);
-#endif /* U8_H */
+#endif /* LIBC3_U_BITS$_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from u.h.in BITS=16 bits=16 */
-#ifndef U16_H
-#define U16_H
+#ifndef LIBC3_U16_H
+#define LIBC3_U16_H
#include "types.h"
u16 * u16_cast (s_tag *tag, u16 *dest);
u16 * u16_copy (const u16 *src, u16 *dest);
-#endif /* U8_H */
+#endif /* LIBC3_U16_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from u.h.in BITS=32 bits=32 */
-#ifndef U32_H
-#define U32_H
+#ifndef LIBC3_U32_H
+#define LIBC3_U32_H
#include "types.h"
u32 * u32_cast (s_tag *tag, u32 *dest);
u32 * u32_copy (const u32 *src, u32 *dest);
-#endif /* U8_H */
+#endif /* LIBC3_U32_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from u.h.in BITS=64 bits=64 */
-#ifndef U64_H
-#define U64_H
+#ifndef LIBC3_U64_H
+#define LIBC3_U64_H
#include "types.h"
u64 * u64_cast (s_tag *tag, u64 *dest);
u64 * u64_copy (const u64 *src, u64 *dest);
-#endif /* U8_H */
+#endif /* LIBC3_U64_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from u.h.in BITS=8 bits=8 */
-#ifndef U8_H
-#define U8_H
+#ifndef LIBC3_U8_H
+#define LIBC3_U8_H
#include "types.h"
u8 * u8_cast (s_tag *tag, u8 *dest);
u8 * u8_copy (const u8 *src, u8 *dest);
-#endif /* U8_H */
+#endif /* LIBC3_U8_H */
@@ -11,12 +11,12 @@
* THIS SOFTWARE.
*/
/* Gen from u.h.in BITS=W bits=w */
-#ifndef UW_H
-#define UW_H
+#ifndef LIBC3_UW_H
+#define LIBC3_UW_H
#include "types.h"
uw * uw_cast (s_tag *tag, uw *dest);
uw * uw_copy (const uw *src, uw *dest);
-#endif /* U8_H */
+#endif /* LIBC3_UW_H */
@@ -10,11 +10,11 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef VAR_H
-#define VAR_H
+#ifndef LIBC3_VAR_H
+#define LIBC3_VAR_H
#include "types.h"
s_tag * var_copy (const s_tag *src, s_tag *dest);
-#endif /* VAR_H */
+#endif /* LIBC3_VAR_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef WINDOW_CAIRO_H
-#define WINDOW_CAIRO_H
+#ifndef LIBC3_WINDOW_CAIRO_H
+#define LIBC3_WINDOW_CAIRO_H
#include <libc3/types.h>
#include <cairo/cairo.h>
@@ -32,4 +32,4 @@ bool window_cairo_motion_default (s_window_cairo *window, sw x, sw y);
bool window_cairo_render_default (s_window_cairo *window, cairo_t *cr);
bool window_cairo_resize_default (s_window_cairo *window, uw w, uw h);
-#endif /* WINDOW_CAIRO_H */
+#endif /* LIBC3_WINDOW_CAIRO_H */
@@ -10,8 +10,8 @@
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
-#ifndef WINDOW_CAIRO_XCB_H
-#define WINDOW_CAIRO_XCB_H
+#ifndef LIBC3_WINDOW_CAIRO_XCB_H
+#define LIBC3_WINDOW_CAIRO_XCB_H
#include <libc3/types.h>
#include <xcb/xcb.h>
@@ -22,4 +22,4 @@ bool window_cairo_xcb_run (s_window_cairo *window);
xcb_visualtype_t * xcb_screen_visual_type (xcb_screen_t *screen);
-#endif /* ndef WINDOW_CAIRO_XCB_H */
+#endif /* LIBC3_WINDOW_CAIRO_XCB_H */