HologramDepthmap Library
sys.h
Go to the documentation of this file.
1 #ifndef __sys_h
2 #define __sys_h
3 
4 #ifdef _WIN32
5 
6 #include <windows.h>
7 #include <conio.h>
8 #include <stdio.h>
9 
10 typedef wchar_t WChar;
11 
12 #define LOG _cprintf
13 void file_log(const char *fmt, ...);
14 
15 #endif
16 
17 #ifdef _MAC_OS
18 
19 #include <stdio.h>
20 
21 #define LOG printf
22 
23 void file_log(const char *fmt, ...);
24 
25 #include <unistd.h>
26 #include <signal.h>
27 #include <signal.h>
28 #include <stdio.h>
29 #include <stdlib.h>
30 
31 #include <stdlib.h>
32 #include <errno.h>
33 #include <sys/mman.h>
34 #include <ucontext.h>
35 
36 #include <string.h>
37 #include <wchar.h>
38 
39 #endif
40 
41 
42 //#ifdef _WIN32
43 //#include "GL/glew.h"
44 //#include <GL/gl.h>
45 //#include <GL/glu.h>
46 //#include <GL/glext.h>
47 //#endif
48 
49 
50 #ifdef _MAC_OS
51 
52 #include <OpenGL/gl.h>
53 #include <OpenGL/glu.h>
54 
55 typedef char WChar;
56 
57 #endif
58 
59 #include <stdio.h>
60 
61 #ifdef _LINUX
62 
63 #include "graphics/unistd.h"
64 #include "graphics/values.h"
65 #define LOG printf
66 
67 #endif
68 
69 #include <sys/stat.h>
70 #include <fcntl.h>
71 #include <sys/types.h>
72 
73 #define FLOG fprintf
74 
75 
76 #ifdef _MAC_OS
77 
78 void * memalign(size_t align, size_t sz);
79 
80 #endif
81 
82 
83 FILE* file_read_open(const WChar* fname);
84 FILE* file_write_open(const WChar* fname);
85 
86 FILE* file_read_open(const WChar* fname, const WChar* mode);
87 FILE* file_write_open(const WChar* fname, const WChar* mode);
88 
89 WChar* string_cpy(WChar* dest, const WChar* src);
90 WChar* string_cat(WChar* dest, const WChar* src);
91 int string_cmp(const WChar* str1, const WChar* str2);
92 
93 #endif
94 
95 
96 //#ifndef GL_RADEON
97 //#define GL_RADEON
98 //#endif
void file_log(const char *fmt,...)
Definition: sys.cpp:7
FILE * file_read_open(const WChar *fname)
Definition: sys.cpp:38
WChar * string_cpy(WChar *dest, const WChar *src)
Definition: sys.cpp:74
WChar * string_cat(WChar *dest, const WChar *src)
Definition: sys.cpp:83
FILE * file_write_open(const WChar *fname)
Definition: sys.cpp:47
int string_cmp(const WChar *str1, const WChar *str2)
Definition: sys.cpp:92