@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef BSTREE_H
-#define BSTREE_H
-
-#include <stddef.h>
-#include <stdbool.h>
typedef struct bstree_node_t {
struct bstree_node_t* left;
bstree_node_t** curr = find_node(tree->cmpfn, &(tree->root), node, false);
return *curr;
}
-
-#endif /* BSTREE_H */
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef HASH_H
-#define HASH_H
-
-#include <stddef.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdlib.h>
typedef struct hash_entry_t {
unsigned int hash;
}
return ret;
}
-
-#endif /* HASH_H */
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef LEX_H
-#define LEX_H
-
-#include <utf8.h>
-#include <strbuf.h>
typedef struct lex_ctx_t {
FILE* input;
static bool is_alnum(Rune r) {
return (is_alpha(r) || isdec(r));
}
-
-#endif
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef LIST_H
-#define LIST_H
-
-#include <stddef.h>
-#include <stdbool.h>
typedef struct list_node_t {
struct list_node_t* next;
static list_node_t* list_node_prev(list_node_t* node) {
return node->prev;
}
-
-#endif /* LIST_H */
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef PARSE_H
-#define PARSE_H
-
-#include <stdbool.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
/*
NOTE: The tokval_t is left undefined in this header file. It is intended
ctx->markcount--;
seek(ctx, marker);
}
-
-#endif /* PARSE_H */
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef SLIST_H
-#define SLIST_H
-
-#include <stddef.h>
-#include <stdbool.h>
typedef struct slist_node_t {
struct slist_node_t* next;
#define slist_foreach(elem, list) \
for(slist_node_t* elem = slist_front(list); elem != NULL; elem = elem->next)
-
-#endif /* SLIST_H */
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef STRBUF_H
-#define STRBUF_H
-
-#include <utf8.h>
-#include <string.h>
typedef struct {
size_t index;
static void strbuf_cat(strbuf_t* dest, strbuf_t* src) {
strbuf_add_string(dest, strbuf_string(src));
}
-
-#endif /* STRBUF_H */
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef UTF8_H
-#define UTF8_H
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <stdio.h>
typedef uint32_t Rune;
utf8encode(utf, rune);
fprintf(f, "%s", utf);
}
-
-#endif /* UTF8_H */
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef UTIL_H
-#define UTIL_H
/* Standard Macros and Types */
#include <stddef.h>
#define static_assert(expr) \
typedef char unique_id[( expr )?1:-1]
#endif
-
-#endif
@author Michael D. Lowis
@license BSD 2-clause License
*/
-#ifndef VEC_H
-#define VEC_H
-
-#include <stddef.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
typedef struct {
size_t elem_count;
static void vec_clear(vec_t* vec) {
vec->elem_count = 0;
}
-
-#endif /* VEC_H */