diff --git a/platform_linux/linux_4ed.cpp b/platform_linux/linux_4ed.cpp index 59fc1d48..2e4f388b 100644 --- a/platform_linux/linux_4ed.cpp +++ b/platform_linux/linux_4ed.cpp @@ -46,6 +46,7 @@ #include "4ed_font_interface_to_os.h" #include "4ed_system_shared.h" +#include "unix_4ed_headers.h" #include #include @@ -215,6 +216,11 @@ handle_fd(Plat_Handle h){ //////////////////////////////// +#include "unix_4ed_functions.cpp" +#include "4ed_shared_file_handling.cpp" + +//////////////////////////////// + internal void system_schedule_step(){ u64 now = system_now_time(); @@ -238,11 +244,6 @@ system_schedule_step(){ //////////////////////////////// -#include "unix_4ed_functions.cpp" -#include "4ed_shared_file_handling.cpp" - -//////////////////////////////// - internal void LinuxSetWMState(Display* d, Window w, Atom one, Atom two, int mode){ //NOTE(inso): this will only work after it is mapped diff --git a/platform_unix/unix_4ed_functions.cpp b/platform_unix/unix_4ed_functions.cpp index 151a3a99..3e570cbf 100644 --- a/platform_unix/unix_4ed_functions.cpp +++ b/platform_unix/unix_4ed_functions.cpp @@ -9,24 +9,6 @@ // TOP -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(USE_LOG) -# include -#endif - struct Unix_Vars{ u32 use_log; b32 did_first_log; @@ -435,7 +417,7 @@ Sys_File_Exists_Sig(system_file_exists){ internal b32 system_directory_exists(char *path){ struct stat st; - b32 result = (stat(directory.str, &st) == 0 && S_ISDIR(st.st_mode)); + b32 result = (stat(path, &st) == 0 && S_ISDIR(st.st_mode)); return(result); } diff --git a/platform_unix/unix_4ed_headers.h b/platform_unix/unix_4ed_headers.h new file mode 100644 index 00000000..4b4d44b3 --- /dev/null +++ b/platform_unix/unix_4ed_headers.h @@ -0,0 +1,31 @@ +/* + * Mr. 4th Dimention - Allen Webster + * + * 18.07.2017 + * + * General unix includes + * + */ + +// TOP + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(USE_LOG) +# include +#endif + +// BOTTOM +