Major header reworking, this respects the namespaces properly. Makes object dependenc...
authorDale Weiler <killfieldengine@gmail.com>
Tue, 4 Jun 2013 02:47:07 +0000 (02:47 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Tue, 4 Jun 2013 02:47:07 +0000 (02:47 +0000)
17 files changed:
ast.c
code.c
conout.c
correct.c
exec.c
ftepp.c
gmqcc.h
ir.c
lexer.c
lexer.h
main.c
opts.c
pak.c
parser.c
stat.c
test.c
util.c

diff --git a/ast.c b/ast.c
index 81e1c121231e16bbb9bdde2c92cf72ec642fda1b..d845eb24a5db26dfd94e962bf198f2657efada26 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -21,7 +21,6 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/code.c b/code.c
index 35f758a22526f966cc00c7a28c45c74c0ee0d43a..c2838efa41c0aad6ad8c8f3153043445f09700de 100644 (file)
--- a/code.c
+++ b/code.c
@@ -21,6 +21,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
+#include <string.h>
 #include "gmqcc.h"
 
 /*
index 687fdf499a9e590af16c6c90a4006187b3ca5b4f..80ec5e1a387499a4485892f28733e0303f4530d1 100644 (file)
--- a/conout.c
+++ b/conout.c
@@ -21,7 +21,6 @@
  * SOFTWARE.
  */
 #include "gmqcc.h"
-#include <stdio.h>
 
 /*
  * isatty/STDERR_FILENO/STDOUT_FILNO
index 7e16608a0084c260810a1f9240e757f6d00f0673..f501817acc86582223c524df96a202a614a08bc8 100644 (file)
--- a/correct.c
+++ b/correct.c
@@ -21,6 +21,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
+#include <string.h>
 #include "gmqcc.h"
 
 /*
diff --git a/exec.c b/exec.c
index 49cff447a223df7b8f24b55ad9c7ba1103f3f90e..18b9f30fc6bd2f031505e66fc3dfca85929aec79 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -26,6 +26,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
+#include <stdlib.h>
 
 #include "gmqcc.h"
 
diff --git a/ftepp.c b/ftepp.c
index 5348dfb5448ba923d95de60cf7e8829df71f24fd..0a9ff5b64ee47339cf1a76c0bb44986e348aa14c 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
  * SOFTWARE.
  */
 #include <time.h>
+#include <string.h>
+#include <stdlib.h>
 #include <sys/stat.h>
+
 #include "gmqcc.h"
 #include "lexer.h"
 
diff --git a/gmqcc.h b/gmqcc.h
index 5922b840bb23394ad59b6140ade0db1821252d15..6dde0cd71fb1172942d23ad7ffe9671f036c8b65 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
  */
 #ifndef GMQCC_HDR
 #define GMQCC_HDR
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
 #include <stdarg.h>
-#include <stdio.h>
-#include <ctype.h>
+#include <stdio.h> /* TODO: remove this */
 
 /*
  * Disable some over protective warnings in visual studio because fixing them is a waste
diff --git a/ir.c b/ir.c
index 5dae734462fe6b7513f60588ebce6439383fd778..fcf4caaf9decb7b66587c3a3f05f9b97bc3e01a6 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -23,6 +23,7 @@
  */
 #include <stdlib.h>
 #include <string.h>
+
 #include "gmqcc.h"
 #include "ir.h"
 
diff --git a/lexer.c b/lexer.c
index 862131e1162ecb764acdd3ae7e72d569b65f0e95..8289057e1f0f20c720aa506241c1afe17818b3d5 100644 (file)
--- a/lexer.c
+++ b/lexer.c
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include <stdio.h>
-#include <stdlib.h>
+#include <ctype.h>
 #include <string.h>
-#include <stdarg.h>
+#include <stdlib.h>
 
 #include "gmqcc.h"
 #include "lexer.h"
-
 /*
  * List of Keywords
  */
diff --git a/lexer.h b/lexer.h
index cde0863e80877952a7dd8f518bed167ed0355780..f51d56e9073840d021e09f66e6ce03a68c16a54c 100644 (file)
--- a/lexer.h
+++ b/lexer.h
@@ -22,7 +22,6 @@
  */
 #ifndef GMQCC_LEXER_HDR
 #define GMQCC_LEXER_HDR
-
 typedef struct token_s token;
 
 struct token_s {
diff --git a/main.c b/main.c
index 5717fb55c247f8e90df3b5a0a5d5357e89577f0f..cbcadf10260a317ceaf96d693f9c254740069e2f 100644 (file)
--- a/main.c
+++ b/main.c
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+
 #include "gmqcc.h"
 #include "lexer.h"
-#include <time.h>
 
 /* TODO: cleanup this whole file .. it's a fuckign mess */
 
diff --git a/opts.c b/opts.c
index abd012fa6a160d12ad4db4aea7fb306ae38b2632..4cfa79c9eb13fd900e2cf5935db8fb253169a42c 100644 (file)
--- a/opts.c
+++ b/opts.c
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
 #include "gmqcc.h"
+
 unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
 opts_cmd_t   opts; /* command lien options */
 
diff --git a/pak.c b/pak.c
index ac31bdf6bcd5f45675648c6500ca50cd95755325..2371ee111bdf38630efe31d42139dbef85ff6118 100644 (file)
--- a/pak.c
+++ b/pak.c
@@ -20,6 +20,9 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
+#include <string.h>
+#include <stdlib.h>
+
 #include "gmqcc.h"
 
 /*
index cf69136bd668eb351502b37298ec4fc4095a6c84..e92cb6e6326c82faf2822e0c421ca3fbfaa453af 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -21,8 +21,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include <stdio.h>
-#include <stdarg.h>
+#include <string.h>
 #include <math.h>
 
 #include "gmqcc.h"
diff --git a/stat.c b/stat.c
index 0192a2fa71171143f41902fad8f0043745a86b36..aecd7ebcd9619e81b3d3f5632e7a5a0eccb0eeb0 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1,3 +1,7 @@
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
 #include "gmqcc.h"
 
 /*
@@ -22,6 +26,12 @@ typedef struct {
     size_t value;
 } stat_size_entry_t, **stat_size_table_t;
 
+typedef struct {
+    uint64_t used;
+    uint64_t type;
+    uint64_t size;
+} stat_entry_t;
+
 static uint64_t          stat_mem_allocated         = 0;
 static uint64_t          stat_mem_deallocated       = 0;
 static uint64_t          stat_mem_allocated_total   = 0;
@@ -37,7 +47,6 @@ static stat_size_table_t stat_size_vectors          = NULL;
 static stat_size_table_t stat_size_hashtables       = NULL;
 static stat_mem_block_t *stat_mem_block_root        = NULL;
 
-
 /*
  * A tiny size_t key-value hashtbale for tracking vector and hashtable
  * sizes. We can use it for other things too, if we need to. This is
diff --git a/test.c b/test.c
index e6567f05c21cbd888eb3a5f7a42fd31a2a7515b3..1ebb33a55b4f95222d86158ba3f14d5b97018e63 100644 (file)
--- a/test.c
+++ b/test.c
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include "gmqcc.h"
+#include <stdlib.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#include "gmqcc.h"
+
 opts_cmd_t opts;
 
 static const char *task_bins[] = {
diff --git a/util.c b/util.c
index c6c89253f4b501f20b2fbb4149bf6b1813a0332b..5e234ae4c749d915742d8f7fe22db01765930f2b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -21,8 +21,9 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include <stdarg.h>
-#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+
 #include "gmqcc.h"
 
 void util_debug(const char *area, const char *ms, ...) {