From 01a6d7110163cc86d8b7c8af5b15300cb5f22a1b Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Wed, 30 Nov 2022 18:30:39 +0000 Subject: [PATCH] Remove Constants.h --- TODO.txt | 1 - src/Http.c | 5 ++++- src/Memory.c | 6 ++++-- src/include/Constants.h | 35 ----------------------------------- 4 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 src/include/Constants.h diff --git a/TODO.txt b/TODO.txt index 62ffce7..9816768 100644 --- a/TODO.txt +++ b/TODO.txt @@ -31,7 +31,6 @@ Due: January 1, 2023 [ ] Config [ ] API (Config.3) [ ] File format (Config.5) - [ ] Constants [x] HashMap [ ] Http [ ] HttpServer diff --git a/src/Http.c b/src/Http.c index 0b9b380..91f6d66 100644 --- a/src/Http.c +++ b/src/Http.c @@ -28,9 +28,12 @@ #include #include -#include #include +#ifndef TELODENDRIA_STRING_CHUNK +#define TELODENDRIA_STRING_CHUNK 64 +#endif + const char * HttpRequestMethodToString(const HttpRequestMethod method) { diff --git a/src/Memory.c b/src/Memory.c index efc10be..21eb418 100644 --- a/src/Memory.c +++ b/src/Memory.c @@ -23,12 +23,14 @@ */ #include -#include - #include #include #include +#ifndef TELODENDRIA_MEMORY_TABLE_CHUNK +#define TELODENDRIA_MEMORY_TABLE_CHUNK 256 +#endif + struct MemoryInfo { size_t size; diff --git a/src/include/Constants.h b/src/include/Constants.h deleted file mode 100644 index e95d2cb..0000000 --- a/src/include/Constants.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2022 Jordan Bancino <@jordan:bancino.net> - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation files - * (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef TELODENDRIA_CONSTANTS_H -#define TELODENDRIA_CONSTANTS_H - -#ifndef TELODENDRIA_STRING_CHUNK -#define TELODENDRIA_STRING_CHUNK 64 -#endif - -#ifndef TELODENDRIA_MEMORY_TABLE_CHUNK -#define TELODENDRIA_MEMORY_TABLE_CHUNK 256 -#endif - -#endif