Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3584 | sourcerer | 1 | #include |
2 | #include |
||
3 | #include |
||
4 | |||
5 | |||
6 | /* |
||
7 | long int __divdi3(long int a, long int b) { |
||
8 | //__menuet__debug_out("divdi3\n"); |
||
9 | return 0;} |
||
10 | */ |
||
11 | |||
12 | /* |
||
13 | long long int __divdi3(long long int a, long long int b) { |
||
14 | __menuet__debug_out("divdi3\n"); |
||
15 | return a/b;} |
||
16 | */ |
||
17 | |||
18 | |||
19 | char * locale_charset(){ |
||
20 | __menuet__debug_out("Charset is US\n"); |
||
21 | return "US-ASCII";} |
||
22 | |||
23 | float strtof(const char* str, char** endptr){ |
||
24 | __menuet__debug_out("STRTOOOF\n"); |
||
25 | return 0.0f;} |
||
26 | |||
27 | |||
28 | char *realpath(const char *path, char *resolved_path){ |
||
29 | char zuup[1024]; |
||
30 | int i; |
||
31 | char *zoo; |
||
32 | char *boo; |
||
33 | char n, s; |
||
34 | |||
35 | if (resolved_path==0) { |
||
36 | __menuet__debug_out("ResPath is null"); |
||
37 | resolved_path=malloc(strlen(path)+1); |
||
38 | } |
||
39 | |||
40 | zoo=resolved_path; |
||
41 | boo=path; |
||
42 | memcpy(zoo,boo,strlen(boo)); |
||
43 | zoo[strlen(boo)]=0; |
||
44 | |||
45 | |||
46 | for (i=0; i |
||
47 | n=*path; |
||
48 | path++; |
||
49 | s=*path; |
||
50 | |||
51 | if ((n=='/' && s!='/') || (n!='/') ) { |
||
52 | *resolved_path=n; |
||
53 | resolved_path++; |
||
54 | |||
55 | } |
||
56 | } |
||
57 | *resolved_path=0; |
||
58 | |||
59 | |||
60 | |||
61 | __menuet__debug_out("Real path is... \n"); |
||
62 | sprintf (zuup, "A:%s\n", boo); |
||
63 | __menuet__debug_out(zuup); |
||
64 | sprintf (zuup, "B:%s\n", zoo); |
||
65 | __menuet__debug_out(zuup); |
||
66 | |||
67 | //memcpy(resolved_path, path, strlen(path)); |
||
68 | |||
69 | |||
70 | |||
71 | |||
72 | |||
73 | return zoo; |
||
74 | } |
||
75 | |||
76 | #include |
||
77 | #include |
||
78 | |||
79 | int inet_aton(const char *cp, struct in_addr *inp){ |
||
80 | __menuet__debug_out("No IP\n"); |
||
81 | return 0; |
||
82 | } |
||
83 | |||
84 | #include |
||
85 | |||
86 | void va_copy(va_list dest, va_list src){ //WHAA |
||
87 | dest=src; |
||
88 | __menuet__debug_out("Some shit...\n"); |
||
89 | } |
||
90 | |||
91 | |||
92 | |||
93 | void timeradd(struct timeval *a, struct timeval *b, |
||
94 | struct timeval *res){ |
||
95 | |||
96 | (res)->tv_sec = (a)->tv_sec + (b)->tv_sec; |
||
97 | (res)->tv_usec = (a)->tv_usec + (b)->tv_usec; |
||
98 | if ((res)->tv_usec >= 1000000) { |
||
99 | (res)->tv_sec++; |
||
100 | (res)->tv_usec -= 1000000; |
||
101 | } |
||
102 | //__menuet__debug_out("Timeradd\n"); |
||
103 | } |
||
104 | |||
105 | void timersub(struct timeval *a, struct timeval *b, |
||
106 | struct timeval *res){ |
||
107 | |||
108 | res->tv_sec=a->tv_sec - b->tv_sec; |
||
109 | res->tv_usec=a->tv_usec - b->tv_usec; |
||
110 | if ((res)->tv_usec < 0) { |
||
111 | (res)->tv_sec--; |
||
112 | (res)->tv_usec += 1000000; |
||
113 | } |
||
114 | // __menuet__debug_out("Timersub\n"); |
||
115 | } |
||
116 | |||
117 | |||
118 | |||
119 | int timerisset(struct timeval *tvp){ |
||
120 | |||
121 | //__menuet__debug_out("Timer is set?\n"); |
||
122 | |||
123 | return ((tvp)->tv_sec || (tvp)->tv_usec); |
||
124 | |||
125 | } |
||
126 | |||
127 | int timercmp(struct timeval *a, struct timeval *b, int z){ |
||
128 | |||
129 | //__menuet__debug_out("Timercmp is a MACRO \n"); |
||
130 | |||
131 | if (a->tv_sec > b->tv_sec) return 1; //was 1 |
||
132 | return 0;} |
||
133 | |||
134 | int wctomb(char *s, int wchar){ |
||
135 | |||
136 | __menuet__debug_out("wctomb\n"); |
||
137 | return 0;} |
||
138 | |||
139 | int wcrtomb(char * s, int wc, int * ps){ |
||
140 | __menuet__debug_out("wcrtomb\n"); |
||
141 | return 0; |
||
142 | } |
||
143 | |||
144 | int mbrtowc(int * pwc, const char * s, |
||
145 | int n, int * ps){ |
||
146 | __menuet__debug_out("mbrtowc\n"); |
||
147 | return 0;} |
||
148 | |||
149 | int johab_hangul_decompose( const char * s){ |
||
150 | __menuet__debug_out("hanguul?\n"); |
||
151 | return 0;}> |