diff options
| author | Tylo <[email protected]> | 2020-06-15 21:20:29 +0200 |
|---|---|---|
| committer | Tylo <[email protected]> | 2020-06-15 21:20:29 +0200 |
| commit | 2bcc2fa8f094de7a4a7d78093dfe62023499e4d8 (patch) | |
| tree | 78bac1b58536221f87275e98b6c397dfe2342a6e | |
| parent | d5d547b7315c9deae74ead71ef434e9f25c674f7 (diff) | |
| download | STC-modified-2bcc2fa8f094de7a4a7d78093dfe62023499e4d8.tar.gz STC-modified-2bcc2fa8f094de7a4a7d78093dfe62023499e4d8.zip | |
Fixed including standard include files.
| -rw-r--r-- | benchmark.c | 10 | ||||
| -rw-r--r-- | demos.c | 3 | ||||
| -rw-r--r-- | stc/cdefs.h | 1 | ||||
| -rw-r--r-- | stc/cmap.h | 2 | ||||
| -rw-r--r-- | stc/cstring.h | 8 | ||||
| -rw-r--r-- | stc/cvector.h | 2 |
6 files changed, 11 insertions, 15 deletions
diff --git a/benchmark.c b/benchmark.c index 2222453a..c7fbc956 100644 --- a/benchmark.c +++ b/benchmark.c @@ -1,11 +1,11 @@ -//#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-
+#include "stc/crandom.h"
#include "stc/cstring.h"
#include "stc/cmap.h"
-#include "stc/crandom.h"
#include "others/khash.h"
+
+#include <stdio.h>
+#include <time.h>
+
#ifdef __cplusplus
#include <unordered_map>
#include "others/bytell_hash_map.hpp"
@@ -1,8 +1,7 @@ -#include <stdlib.h> -#include "stc/cstring.h" #include "stc/cvector.h" #include "stc/clist.h" #include "stc/cmap.h" +#include "stc/cstring.h" void stringdemo1() diff --git a/stc/cdefs.h b/stc/cdefs.h index 6a0a7998..a5201a25 100644 --- a/stc/cdefs.h +++ b/stc/cdefs.h @@ -24,6 +24,7 @@ #define CDEFS__H__
#include <stdint.h>
+#include <stddef.h>
#include <stdbool.h>
#if defined(_MSC_VER)
@@ -42,7 +42,7 @@ int main(void) { #ifndef CMAP__H__
#define CMAP__H__
-#include <malloc.h>
+#include <stdlib.h>
#include "cdefs.h"
#define cmap_init {NULL, NULL, 0, 0, 90, 0}
diff --git a/stc/cstring.h b/stc/cstring.h index cf635be8..9cbdcfb5 100644 --- a/stc/cstring.h +++ b/stc/cstring.h @@ -23,14 +23,10 @@ #ifndef CSTRING__H__
#define CSTRING__H__
-#include <stdlib.h> /* alloca */
-#include <malloc.h>
-#include <stddef.h>
-#include <stdbool.h>
+#include <stdlib.h> /* alloca, malloc */
#include <string.h>
-#include <stdint.h>
#include <stdarg.h>
-#include <stdio.h>
+#include <stdio.h> /* vsnprintf */
#include "cdefs.h"
diff --git a/stc/cvector.h b/stc/cvector.h index 292954b1..cee33e27 100644 --- a/stc/cvector.h +++ b/stc/cvector.h @@ -23,7 +23,7 @@ #ifndef CVECTOR__H__
#define CVECTOR__H__
-#include <malloc.h>
+#include <stdlib.h>
#include <string.h>
#include "cdefs.h"
|
