]> git.mdlowis.com Git - projs/alib.git/commitdiff
Implemente plan9 header style: Remove includes and include guards from all headers...
authorMike Lowis <mike.lowis@gentex.com>
Thu, 28 Jul 2016 14:44:47 +0000 (10:44 -0400)
committerMike Lowis <mike.lowis@gentex.com>
Thu, 28 Jul 2016 14:44:47 +0000 (10:44 -0400)
source/bstree.h
source/hash.h
source/lex.h
source/list.h
source/parse.h
source/slist.h
source/strbuf.h
source/utf8.h
source/util.h
source/vec.h

index 423222cf89023b68f0873be92e838766fa05f861..ab53c68d2747c73518bb4e3e10b1c2152e317c03 100644 (file)
@@ -3,11 +3,6 @@
   @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;
@@ -72,5 +67,3 @@ static bstree_node_t* bstree_lookup(bstree_t* tree, bstree_node_t* node) {
     bstree_node_t** curr = find_node(tree->cmpfn, &(tree->root), node, false);
     return *curr;
 }
-
-#endif /* BSTREE_H */
index 799925370e8c48ae7dfdc9aadbe2fa9109f99a3e..d2cb62b69efb6a8fbca6d649ca67c271809df31f 100644 (file)
@@ -3,13 +3,6 @@
   @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;
@@ -197,5 +190,3 @@ static bool hash_del(hash_t* hash, hash_entry_t* entry) {
     }
     return ret;
 }
-
-#endif /* HASH_H */
index 562c21cc3df01d735f050bdf70fed6b235abc61c..a7455701586424117e3e255ef7cd55c4567ccdd6 100644 (file)
@@ -3,11 +3,6 @@
   @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;
@@ -163,5 +158,3 @@ static bool is_hex(Rune r) {
 static bool is_alnum(Rune r) {
     return (is_alpha(r) || isdec(r));
 }
-
-#endif
index e5c24e58c6152aa0ce2a9c8a1829683b1d81b62b..9d63b412b5109a4b281024620db0227112912880 100644 (file)
@@ -3,11 +3,6 @@
   @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;
@@ -95,5 +90,3 @@ static bool list_node_has_prev(list_node_t* node) {
 static list_node_t* list_node_prev(list_node_t* node) {
     return node->prev;
 }
-
-#endif /* LIST_H */
index e510831d46e27f4002e8595dbe45b67a9fd8cdff..a4bf05835d2e8dbd7e0fafd3c9cbb7a26308b3f3 100644 (file)
@@ -3,13 +3,6 @@
   @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
@@ -143,5 +136,3 @@ static void release(parser_t* ctx) {
     ctx->markcount--;
     seek(ctx, marker);
 }
-
-#endif /* PARSE_H */
index 27863009923f9c643a331565587ae2af029e9d17..7fab57e1d4daa6e49704b47a346ff70b5b576f98 100644 (file)
@@ -3,11 +3,6 @@
   @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;
@@ -91,5 +86,3 @@ static slist_node_t* slist_node_next(slist_node_t* node) {
 
 #define slist_foreach(elem, list) \
     for(slist_node_t* elem = slist_front(list); elem != NULL; elem = elem->next)
-
-#endif /* SLIST_H */
index 2cc81a1c844acd43daf65382a6d917c874472152..3eeee9e11891a0efb7141988880730a0b930ca31 100644 (file)
@@ -3,11 +3,6 @@
   @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;
@@ -66,5 +61,3 @@ static void strbuf_add_rune(strbuf_t* buf, Rune rune) {
 static void strbuf_cat(strbuf_t* dest, strbuf_t* src) {
     strbuf_add_string(dest, strbuf_string(src));
 }
-
-#endif /* STRBUF_H */
index e30c0b9b3bce0671e1afc3dd2a4b180190390971..684e83024a282133913734ae686addcad934e912 100644 (file)
@@ -3,12 +3,6 @@
   @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;
 
@@ -107,5 +101,3 @@ static void fputrune(Rune rune, FILE* f) {
     utf8encode(utf, rune);
     fprintf(f, "%s", utf);
 }
-
-#endif /* UTF8_H */
index 2e4405abca1f0988d4816b08325a84747c0f57dc..c01b700e09dfa809c27906b5fef86d06908bb5c7 100644 (file)
@@ -3,8 +3,6 @@
   @author Michael D. Lowis
   @license BSD 2-clause License
 */
-#ifndef UTIL_H
-#define UTIL_H
 
 /* Standard Macros and Types */
 #include <stddef.h>
@@ -283,5 +281,3 @@ static inline char* _getopt_(int* p_argc, char*** p_argv) {
     #define static_assert(expr) \
         typedef char unique_id[( expr )?1:-1]
 #endif
-
-#endif
index d01a20c29e93fbc9ee2f726aa589eb955790ad0d..2abfd3f218e897bfa51562d626b50a17209db410 100644 (file)
@@ -3,14 +3,6 @@
   @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;
@@ -115,5 +107,3 @@ static void vec_pop_back(vec_t* vec, void* outdata) {
 static void vec_clear(vec_t* vec) {
     vec->elem_count = 0;
 }
-
-#endif /* VEC_H */