Cleaned #include directives so C standard library headers are sorted and so each source file only includes one header file. This makes things clenaer, and alos allows us to more properly strip unneeded headers later.

This commit is contained in:
Pietro Gagliardi 2019-06-01 09:27:17 -04:00
parent a93f5c8f53
commit 48cd6e1dd8
13 changed files with 20 additions and 36 deletions

View File

@ -1,9 +1,4 @@
// 16 may 2019 // 16 may 2019
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ui.h"
#include "uipriv.h" #include "uipriv.h"
#define sharedbitsPrefix uipriv #define sharedbitsPrefix uipriv

View File

@ -1,7 +1,4 @@
// 12 may 2019 // 12 may 2019
#include <stdarg.h>
#include <stdio.h>
#include "ui.h"
#include "uipriv.h" #include "uipriv.h"
#include "testhooks.h" #include "testhooks.h"

View File

@ -1,7 +1,4 @@
// 15 may 2019 // 15 may 2019
#include <stdlib.h>
#include <string.h>
#include "ui.h"
#include "uipriv.h" #include "uipriv.h"
struct handler { struct handler {

View File

@ -1,8 +1,4 @@
// 19 april 2019 // 19 april 2019
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "ui.h"
#include "uipriv.h" #include "uipriv.h"
// TODO rename this file to main.c // TODO rename this file to main.c

View File

@ -1,6 +1,13 @@
// 19 april 2019 // 19 april 2019
#include <errno.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ui.h"
#ifdef uiprivOSHeader
#include uiprivOSHeader
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -31,6 +38,7 @@ extern bool uiprivSysCheckThread(void);
// alloc.c // alloc.c
#define sharedbitsPrefix uipriv #define sharedbitsPrefix uipriv
// TODO determine if we need the ../ or not, and if not, figure out if we should use it everywhere (including ui.h) or not
#include "../sharedbits/alloc_header.h" #include "../sharedbits/alloc_header.h"
#include "../sharedbits/array_header.h" #include "../sharedbits/array_header.h"
#define uiprivArrayStaticInit(T, grow, whatstr) { NULL, 0, 0, sizeof (T), grow, whatstr } #define uiprivArrayStaticInit(T, grow, whatstr) { NULL, 0, 0, sizeof (T), grow, whatstr }

View File

@ -6,8 +6,7 @@
#import <dlfcn.h> // see future.m #import <dlfcn.h> // see future.m
#import <pthread.h> #import <pthread.h>
#import <stdlib.h> #import <stdlib.h>
#import "../ui.h" #define uiprivOSHeader "../ui_darwin.h"
#import "../ui_darwin.h"
#import "../common/uipriv.h" #import "../common/uipriv.h"
#if __has_feature(objc_arc) #if __has_feature(objc_arc)

View File

@ -1,6 +1,4 @@
// 18 may 2019 // 18 may 2019
#include <stdlib.h>
#include <string.h>
#include "test.h" #include "test.h"
// TODO: // TODO:

View File

@ -1,7 +1,4 @@
// 10 april 2019 // 10 april 2019
#include <inttypes.h>
#include <string.h>
#include "lib/thread.h"
#include "test.h" #include "test.h"
testingSet *beforeTests = NULL; testingSet *beforeTests = NULL;

View File

@ -1,6 +1,4 @@
// 10 april 2019 // 10 april 2019
#include <stdio.h>
#include <string.h>
#include "test.h" #include "test.h"
void timeoutMain(void *data) void timeoutMain(void *data)

View File

@ -1,9 +1,4 @@
// 28 may 2019 // 28 may 2019
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lib/thread.h"
#include "test.h" #include "test.h"
struct errorCase { struct errorCase {

View File

@ -1,7 +1,13 @@
// 28 april 2019 // 28 april 2019
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../ui.h" #include "../ui.h"
#include "../common/testhooks.h" #include "../common/testhooks.h"
#include "lib/testing.h" #include "lib/testing.h"
#include "lib/thread.h"
#include "lib/timer.h" #include "lib/timer.h"
#define diff(t, clause, fmt, got, want) testingTErrorf(t, "%s:\ngot " fmt "\nwant " fmt, clause, got, want) #define diff(t, clause, fmt, got, want) testingTErrorf(t, "%s:\ngot " fmt "\nwant " fmt, clause, got, want)

View File

@ -5,12 +5,11 @@
#define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_10 #define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_10
#define GDK_VERSION_MAX_ALLOWED GDK_VERSION_3_10 #define GDK_VERSION_MAX_ALLOWED GDK_VERSION_3_10
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <math.h>
#include <dlfcn.h> // see future.c #include <dlfcn.h> // see future.c
#include <langinfo.h> #include <langinfo.h>
#include <inttypes.h>
#include <math.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h> #define uiprivOSHeader "../ui_unix.h"
#include "../ui.h"
#include "../ui_unix.h"
#include "../common/uipriv.h" #include "../common/uipriv.h"

View File

@ -1,8 +1,7 @@
// 21 april 2016 // 21 april 2016
#include "winapi.hpp" #include "winapi.hpp"
#include "winhresult.hpp" #include "winhresult.hpp"
#include "../ui.h" #define uiprivOSHeader "../ui_windows.h"
#include "../ui_windows.h"
#include "../common/uipriv.h" #include "../common/uipriv.h"
//TODO#include "compilerver.hpp" //TODO#include "compilerver.hpp"