aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp40
1 files changed, 7 insertions, 33 deletions
diff --git a/src/common.cpp b/src/common.cpp
index 6dc2c46..1c9c2b5 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -1,15 +1,16 @@
-#include <common.h>
#include <cstring>
#include <cstdio>
#include <chrono>
#ifndef __WIN32__
-#include <sys/types.h>
-#include <dirent.h>
-#include <errno.h>
-#include <vector>
+# include <sys/types.h>
+# include <dirent.h>
+# include <errno.h>
+# include <vector>
#endif // __WIN32__
+#include <common.h>
+
#ifndef __WIN32__
unsigned int millis(void){
@@ -79,7 +80,7 @@ const char *readFile(const char *path){
std::ifstream in (path,std::ios::in);
unsigned int size;
GLchar *buf;
-
+
if(!in.is_open()){
std::cout<<"Error reading file "<<path<<"!"<<std::endl;
abort();
@@ -101,30 +102,3 @@ UserError( std::string reason )
std::cout << "User error: " << reason << "!" << std::endl;
abort();
}
-
-/*int strCreateFunc(const char *equ){
- static unsigned int size;
- static char *filebuf;
- static FILE *file;
-
- size = 57 + strlen(equ) + 3;
-
- filebuf = new char[size];
- memset(filebuf,0,size);
-
- strcpy(filebuf,"#include <stdio.h>\n#include <math.h>\nint main(){return ");
- strcat(filebuf,equ);
- strcat(filebuf,";}");
-
- if(!(file = fopen("gen.tmp","w"))){
- abort();
- }
-
- fwrite(filebuf,size,sizeof(char),file);
- delete[] filebuf;
- fclose(file);
-
- system("
-
- return 0;
-}*/