Rename defines header (#142)

This commit is contained in:
Bailey Thompson
2020-10-02 19:46:13 -04:00
committed by GitHub
parent cc17f4c6d0
commit 354e0aef1b
19 changed files with 19 additions and 17 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.idea/* .idea/*
cmake-build-debug/* cmake-build-debug/*
venv/*
docs/* docs/*
containers.a containers.a
containers.so containers.so

View File

@@ -51,7 +51,8 @@ for filename in sorted(glob.glob(os.path.join(folder_path, '*.h'))):
with open(filename, 'r') as file: with open(filename, 'r') as file:
text = file.read() text = file.read()
entire_file = text.split("*/", 1)[1] entire_file = text.split("*/", 1)[1]
split_around_include = entire_file.split('#include "all.h"\n\n', 1) split_around_text = '#include "_bk_defines.h"\n\n'
split_around_include = entire_file.split(split_around_text, 1)
header += split_around_include[0] header += split_around_include[0]
if len(split_around_include) == 2: if len(split_around_include) == 2:
header += split_around_include[1] header += split_around_include[1]

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_ARRAY_H #ifndef BKTHOMPS_CONTAINERS_ARRAY_H
#define BKTHOMPS_CONTAINERS_ARRAY_H #define BKTHOMPS_CONTAINERS_ARRAY_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The array data structure, which is a static contiguous array. * The array data structure, which is a static contiguous array.

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_DEQUE_H #ifndef BKTHOMPS_CONTAINERS_DEQUE_H
#define BKTHOMPS_CONTAINERS_DEQUE_H #define BKTHOMPS_CONTAINERS_DEQUE_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The deque data structure, which is a doubly-ended queue. * The deque data structure, which is a doubly-ended queue.

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_FORWARD_LIST_H #ifndef BKTHOMPS_CONTAINERS_FORWARD_LIST_H
#define BKTHOMPS_CONTAINERS_FORWARD_LIST_H #define BKTHOMPS_CONTAINERS_FORWARD_LIST_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The forward_list data structure, which is a singly-linked list. * The forward_list data structure, which is a singly-linked list.

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_LIST_H #ifndef BKTHOMPS_CONTAINERS_LIST_H
#define BKTHOMPS_CONTAINERS_LIST_H #define BKTHOMPS_CONTAINERS_LIST_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The list data structure, which is a doubly-linked list. * The list data structure, which is a doubly-linked list.

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_MAP_H #ifndef BKTHOMPS_CONTAINERS_MAP_H
#define BKTHOMPS_CONTAINERS_MAP_H #define BKTHOMPS_CONTAINERS_MAP_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The map data structure, which is a collection of key-value pairs, sorted by * The map data structure, which is a collection of key-value pairs, sorted by

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_MULTIMAP_H #ifndef BKTHOMPS_CONTAINERS_MULTIMAP_H
#define BKTHOMPS_CONTAINERS_MULTIMAP_H #define BKTHOMPS_CONTAINERS_MULTIMAP_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The multimap data structure, which is a collection of key-value pairs, sorted * The multimap data structure, which is a collection of key-value pairs, sorted

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_MULTISET_H #ifndef BKTHOMPS_CONTAINERS_MULTISET_H
#define BKTHOMPS_CONTAINERS_MULTISET_H #define BKTHOMPS_CONTAINERS_MULTISET_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The multiset data structure, which is a collection of key-value pairs, sorted * The multiset data structure, which is a collection of key-value pairs, sorted

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_PRIORITY_QUEUE_H #ifndef BKTHOMPS_CONTAINERS_PRIORITY_QUEUE_H
#define BKTHOMPS_CONTAINERS_PRIORITY_QUEUE_H #define BKTHOMPS_CONTAINERS_PRIORITY_QUEUE_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The priority_queue data structure, which adapts a container to provide a * The priority_queue data structure, which adapts a container to provide a

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_QUEUE_H #ifndef BKTHOMPS_CONTAINERS_QUEUE_H
#define BKTHOMPS_CONTAINERS_QUEUE_H #define BKTHOMPS_CONTAINERS_QUEUE_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The queue data structure, which adapts a container to provide a queue * The queue data structure, which adapts a container to provide a queue

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_SET_H #ifndef BKTHOMPS_CONTAINERS_SET_H
#define BKTHOMPS_CONTAINERS_SET_H #define BKTHOMPS_CONTAINERS_SET_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The set data structure, which is a collection of unique keys, sorted by keys. * The set data structure, which is a collection of unique keys, sorted by keys.

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_STACK_H #ifndef BKTHOMPS_CONTAINERS_STACK_H
#define BKTHOMPS_CONTAINERS_STACK_H #define BKTHOMPS_CONTAINERS_STACK_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The stack data structure, which adapts a container to provide a stack * The stack data structure, which adapts a container to provide a stack

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_UNORDERED_MAP_H #ifndef BKTHOMPS_CONTAINERS_UNORDERED_MAP_H
#define BKTHOMPS_CONTAINERS_UNORDERED_MAP_H #define BKTHOMPS_CONTAINERS_UNORDERED_MAP_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The unordered_map data structure, which is a collection of key-value pairs, * The unordered_map data structure, which is a collection of key-value pairs,

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_UNORDERED_MULTIMAP_H #ifndef BKTHOMPS_CONTAINERS_UNORDERED_MULTIMAP_H
#define BKTHOMPS_CONTAINERS_UNORDERED_MULTIMAP_H #define BKTHOMPS_CONTAINERS_UNORDERED_MULTIMAP_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The unordered_multimap data structure, which is a collection of key-value * The unordered_multimap data structure, which is a collection of key-value

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_UNORDERED_MULTISET_H #ifndef BKTHOMPS_CONTAINERS_UNORDERED_MULTISET_H
#define BKTHOMPS_CONTAINERS_UNORDERED_MULTISET_H #define BKTHOMPS_CONTAINERS_UNORDERED_MULTISET_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The unordered_multiset data structure, which is a collection of keys, hashed * The unordered_multiset data structure, which is a collection of keys, hashed

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_UNORDERED_SET_H #ifndef BKTHOMPS_CONTAINERS_UNORDERED_SET_H
#define BKTHOMPS_CONTAINERS_UNORDERED_SET_H #define BKTHOMPS_CONTAINERS_UNORDERED_SET_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The unordered_set data structure, which is a collection of unique keys, * The unordered_set data structure, which is a collection of unique keys,

View File

@@ -23,7 +23,7 @@
#ifndef BKTHOMPS_CONTAINERS_VECTOR_H #ifndef BKTHOMPS_CONTAINERS_VECTOR_H
#define BKTHOMPS_CONTAINERS_VECTOR_H #define BKTHOMPS_CONTAINERS_VECTOR_H
#include "all.h" #include "_bk_defines.h"
/** /**
* The vector data structure, which is a dynamic contiguous array. * The vector data structure, which is a dynamic contiguous array.