From a029765cf4501a569e6985d9cbfcefd163521cac Mon Sep 17 00:00:00 2001 From: Evan Burkey Date: Wed, 12 Jul 2023 11:32:21 -0700 Subject: [PATCH] remove lf naming scheme --- .gitignore | 3 +-- CMakeLists.txt | 12 ++++++------ docs/{lfbinarytree.md => binarytree.md} | 0 docs/{lfbool.md => bool.md} | 0 docs/{lfinput.md => input.md} | 0 docs/{lflinkedlist.md => linkedlist.md} | 0 docs/{lfmath.md => math.md} | 0 docs/{lfset.md => set.md} | 0 docs/{lfstack.md => stack.md} | 0 docs/{lfutility.md => utility.md} | 0 include/{lfbinarytree.h => binarytree.h} | 0 include/{lfbool.h => bool.h} | 0 include/{lfinput.h => input.h} | 0 include/{lflinkedlist.h => linkedlist.h} | 0 include/{lfmath.h => math.h} | 2 +- include/{lfset.h => set.h} | 2 +- include/{lfstack.h => stack.h} | 2 +- include/{lfutility.h => utility.h} | 0 mkdocs.yml | 16 ++++++++-------- src/{lfbinarytree.c => binarytree.c} | 2 +- src/{lfinput.c => input.c} | 2 +- src/{lflinkedlist.c => linkedlist.c} | 2 +- src/{lfmath.c => math.c} | 2 +- src/{lfset.c => set.c} | 2 +- src/{lfstack.c => stack.c} | 2 +- tests/tests.c | 10 +++++----- 26 files changed, 29 insertions(+), 30 deletions(-) rename docs/{lfbinarytree.md => binarytree.md} (100%) rename docs/{lfbool.md => bool.md} (100%) rename docs/{lfinput.md => input.md} (100%) rename docs/{lflinkedlist.md => linkedlist.md} (100%) rename docs/{lfmath.md => math.md} (100%) rename docs/{lfset.md => set.md} (100%) rename docs/{lfstack.md => stack.md} (100%) rename docs/{lfutility.md => utility.md} (100%) rename include/{lfbinarytree.h => binarytree.h} (100%) rename include/{lfbool.h => bool.h} (100%) rename include/{lfinput.h => input.h} (100%) rename include/{lflinkedlist.h => linkedlist.h} (100%) rename include/{lfmath.h => math.h} (93%) rename include/{lfset.h => set.h} (96%) rename include/{lfstack.h => stack.h} (91%) rename include/{lfutility.h => utility.h} (100%) rename src/{lfbinarytree.c => binarytree.c} (99%) rename src/{lfinput.c => input.c} (99%) rename src/{lflinkedlist.c => linkedlist.c} (99%) rename src/{lfmath.c => math.c} (98%) rename src/{lfset.c => set.c} (99%) rename src/{lfstack.c => stack.c} (96%) diff --git a/.gitignore b/.gitignore index 8dd421f..6d23c5e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ cmake* .cache build compile_commands.json -docs -site/ +site diff --git a/CMakeLists.txt b/CMakeLists.txt index e8bedda..05060ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,12 +6,12 @@ set(CMAKE_C_STANDARD 99) include_directories(include) set(SOURCES - src/lflinkedlist.c - src/lfset.c - src/lfstack.c - src/lfbinarytree.c - src/lfinput.c - src/lfmath.c + src/linkedlist.c + src/set.c + src/stack.c + src/binarytree.c + src/input.c + src/math.c ) add_library(flint ${SOURCES}) diff --git a/docs/lfbinarytree.md b/docs/binarytree.md similarity index 100% rename from docs/lfbinarytree.md rename to docs/binarytree.md diff --git a/docs/lfbool.md b/docs/bool.md similarity index 100% rename from docs/lfbool.md rename to docs/bool.md diff --git a/docs/lfinput.md b/docs/input.md similarity index 100% rename from docs/lfinput.md rename to docs/input.md diff --git a/docs/lflinkedlist.md b/docs/linkedlist.md similarity index 100% rename from docs/lflinkedlist.md rename to docs/linkedlist.md diff --git a/docs/lfmath.md b/docs/math.md similarity index 100% rename from docs/lfmath.md rename to docs/math.md diff --git a/docs/lfset.md b/docs/set.md similarity index 100% rename from docs/lfset.md rename to docs/set.md diff --git a/docs/lfstack.md b/docs/stack.md similarity index 100% rename from docs/lfstack.md rename to docs/stack.md diff --git a/docs/lfutility.md b/docs/utility.md similarity index 100% rename from docs/lfutility.md rename to docs/utility.md diff --git a/include/lfbinarytree.h b/include/binarytree.h similarity index 100% rename from include/lfbinarytree.h rename to include/binarytree.h diff --git a/include/lfbool.h b/include/bool.h similarity index 100% rename from include/lfbool.h rename to include/bool.h diff --git a/include/lfinput.h b/include/input.h similarity index 100% rename from include/lfinput.h rename to include/input.h diff --git a/include/lflinkedlist.h b/include/linkedlist.h similarity index 100% rename from include/lflinkedlist.h rename to include/linkedlist.h diff --git a/include/lfmath.h b/include/math.h similarity index 93% rename from include/lfmath.h rename to include/math.h index 34542bb..dee977a 100644 --- a/include/lfmath.h +++ b/include/math.h @@ -1,7 +1,7 @@ #ifndef LIBFLINT_H_MATH #define LIBFLINT_H_MATH -#include "lfutility.h" +#include "utility.h" int max_int(int a, int b); diff --git a/include/lfset.h b/include/set.h similarity index 96% rename from include/lfset.h rename to include/set.h index b2c240f..c059a11 100644 --- a/include/lfset.h +++ b/include/set.h @@ -1,7 +1,7 @@ #ifndef LIBFLINT_SET_H #define LIBFLINT_SET_H -#include "lflinkedlist.h" +#include "linkedlist.h" #define Set List diff --git a/include/lfstack.h b/include/stack.h similarity index 91% rename from include/lfstack.h rename to include/stack.h index 6f0739d..1b9d0dc 100644 --- a/include/lfstack.h +++ b/include/stack.h @@ -1,7 +1,7 @@ #ifndef LIBFLINT_STACK_H #define LIBFLINT_STACK_H -#include "lflinkedlist.h" +#include "linkedlist.h" #define Stack List diff --git a/include/lfutility.h b/include/utility.h similarity index 100% rename from include/lfutility.h rename to include/utility.h diff --git a/mkdocs.yml b/mkdocs.yml index 81ef496..6d3946f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -5,12 +5,12 @@ theme: nav: - 'index.md' - 'Modules': - - 'Boolean': 'lfbool.md' - - 'Input': 'lfinput.md' - - 'Math': 'lfmath.md' - - 'Utility': 'lfutility.md' + - 'Boolean': 'bool.md' + - 'Input': 'input.md' + - 'Math': 'math.md' + - 'Utility': 'utility.md' - 'Data Structures': - - 'Binary Tree': 'lfbinarytree.md' - - 'Linked List': 'lflinkedlist.md' - - 'Set': 'lfset.md' - - 'Stack': 'lfstack.md' + - 'Binary Tree': 'binarytree.md' + - 'Linked List': 'linkedlist.md' + - 'Set': 'set.md' + - 'Stack': 'stack.md' diff --git a/src/lfbinarytree.c b/src/binarytree.c similarity index 99% rename from src/lfbinarytree.c rename to src/binarytree.c index 06e4f16..7dbbefe 100644 --- a/src/lfbinarytree.c +++ b/src/binarytree.c @@ -2,7 +2,7 @@ #include #include -#include "lfbinarytree.h" +#include "binarytree.h" void bintree_init(BinTree *tree, void (*destroy)(void *data)) { tree->size = 0; diff --git a/src/lfinput.c b/src/input.c similarity index 99% rename from src/lfinput.c rename to src/input.c index 0c07f52..e0c290a 100644 --- a/src/lfinput.c +++ b/src/input.c @@ -9,7 +9,7 @@ #endif -#include "lfinput.h" +#include "input.h" static FILE* open_file(const char *path, size_t *fsz) { FILE *fp = NULL; diff --git a/src/lflinkedlist.c b/src/linkedlist.c similarity index 99% rename from src/lflinkedlist.c rename to src/linkedlist.c index 1eb166a..25879c1 100644 --- a/src/lflinkedlist.c +++ b/src/linkedlist.c @@ -1,7 +1,7 @@ #include #include -#include "lflinkedlist.h" +#include "linkedlist.h" void ll_init(List *list, void (*destroy)(void *data)) { list->size = 0; diff --git a/src/lfmath.c b/src/math.c similarity index 98% rename from src/lfmath.c rename to src/math.c index 380ec50..8d3a98c 100644 --- a/src/lfmath.c +++ b/src/math.c @@ -1,7 +1,7 @@ #include #include -#include "lfmath.h" +#include "math.h" int max_int(int a, int b) { if (a > b) { diff --git a/src/lfset.c b/src/set.c similarity index 99% rename from src/lfset.c rename to src/set.c index 0857c95..0b35cfa 100644 --- a/src/lfset.c +++ b/src/set.c @@ -1,4 +1,4 @@ -#include "lfset.h" +#include "set.h" void set_init(Set *set, int (*match)(const void *a, const void *b), void (*destroy)(void *data)) { diff --git a/src/lfstack.c b/src/stack.c similarity index 96% rename from src/lfstack.c rename to src/stack.c index f8d1c49..6e9b8ea 100644 --- a/src/lfstack.c +++ b/src/stack.c @@ -1,4 +1,4 @@ -#include "lfstack.h" +#include "stack.h" void stack_init(Stack *stack, void (*destroy)(void *data)) { ll_init(stack, destroy); diff --git a/tests/tests.c b/tests/tests.c index c4b40ca..c463b26 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -1,11 +1,11 @@ #include #include -#include "lflinkedlist.h" -#include "lfset.h" -#include "lfstack.h" -#include "lfbinarytree.h" -#include "lfmath.h" +#include "linkedlist.h" +#include "set.h" +#include "stack.h" +#include "binarytree.h" +#include "math.h" void print_ll(List *list) { LL_ITER(list) {