Rev 4364 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4364 | Rev 5043 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include |
1 | #include |
2 | #include |
2 | #include |
3 | #include |
3 | #include |
Line -... | Line 4... | ||
- | 4 | ||
- | 5 | #ifdef DBG |
|
- | 6 | #undef DBG |
|
- | 7 | #endif |
|
- | 8 | #define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */ |
|
Line 4... | Line 9... | ||
4 | 9 | //#define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */ |
|
5 | 10 | ||
6 | /* |
11 | /* |
7 | long int __divdi3(long int a, long int b) { |
12 | long int __divdi3(long int a, long int b) { |
8 | //__menuet__debug_out("divdi3\n"); |
13 | //DBG("divdi3\n"); |
Line 9... | Line 14... | ||
9 | return 0;} |
14 | return 0;} |
10 | */ |
15 | */ |
11 | 16 | ||
12 | /* |
17 | /* |
13 | long long int __divdi3(long long int a, long long int b) { |
18 | long long int __divdi3(long long int a, long long int b) { |
Line 14... | Line 19... | ||
14 | __menuet__debug_out("divdi3\n"); |
19 | DBG("divdi3\n"); |
15 | return a/b;} |
20 | return a/b;} |
16 | */ |
21 | */ |
Line 17... | Line 22... | ||
17 | 22 | ||
18 | 23 | ||
19 | char * locale_charset(){ |
24 | char * locale_charset(){ |
Line 20... | Line 25... | ||
20 | __menuet__debug_out("Charset is US\n"); |
25 | DBG("Charset is US\n"); |
21 | return "US-ASCII";} |
26 | return "US-ASCII";} |
Line 31... | Line 36... | ||
31 | char *zoo; |
36 | char *zoo; |
32 | char *boo; |
37 | char *boo; |
33 | char n, s; |
38 | char n, s; |
Line 34... | Line 39... | ||
34 | 39 | ||
35 | if (resolved_path==0) { |
40 | if (resolved_path==0) { |
36 | __menuet__debug_out("ResPath is null"); |
41 | DBG("ResPath is null"); |
37 | resolved_path=malloc(strlen(path)+1); |
42 | resolved_path=malloc(strlen(path)+1); |
Line 38... | Line 43... | ||
38 | } |
43 | } |
39 | 44 | ||
Line 56... | Line 61... | ||
56 | } |
61 | } |
57 | *resolved_path=0; |
62 | *resolved_path=0; |
Line 58... | Line 63... | ||
58 | 63 | ||
59 | 64 | ||
60 | 65 | ||
61 | __menuet__debug_out("Real path is... \n"); |
66 | DBG("Real path is... \n"); |
62 | sprintf (zuup, "A:%s\n", boo); |
67 | sprintf (zuup, "A:%s\n", boo); |
Line 63... | Line 68... | ||
63 | __menuet__debug_out(zuup); |
68 | DBG(zuup); |
Line 75... | Line 80... | ||
75 | 80 | ||
76 | #include |
81 | #include |
Line 77... | Line 82... | ||
77 | #include |
82 | #include |
78 | 83 | ||
79 | int inet_aton(const char *cp, struct in_addr *inp){ |
84 | int inet_aton(const char *cp, struct in_addr *inp){ |
80 | __menuet__debug_out("No IP\n"); |
85 | DBG("No IP\n"); |
Line 81... | Line 86... | ||
81 | return 0; |
86 | return 0; |
Line 82... | Line 87... | ||
82 | } |
87 | } |
83 | 88 | ||
84 | #include |
89 | #include |
85 | 90 | ||
Line 86... | Line 91... | ||
86 | void va_copy(va_list dest, va_list src){ //WHAA |
91 | void va_copy(va_list dest, va_list src){ //WHAA |
Line 97... | Line 102... | ||
97 | (res)->tv_usec = (a)->tv_usec + (b)->tv_usec; |
102 | (res)->tv_usec = (a)->tv_usec + (b)->tv_usec; |
98 | if ((res)->tv_usec >= 1000000) { |
103 | if ((res)->tv_usec >= 1000000) { |
99 | (res)->tv_sec++; |
104 | (res)->tv_sec++; |
100 | (res)->tv_usec -= 1000000; |
105 | (res)->tv_usec -= 1000000; |
101 | } |
106 | } |
102 | //__menuet__debug_out("Timeradd\n"); |
107 | //DBG("Timeradd\n"); |
103 | } |
108 | } |
Line 104... | Line 109... | ||
104 | 109 | ||
105 | void timersub(struct timeval *a, struct timeval *b, |
110 | void timersub(struct timeval *a, struct timeval *b, |
Line 109... | Line 114... | ||
109 | res->tv_usec=a->tv_usec - b->tv_usec; |
114 | res->tv_usec=a->tv_usec - b->tv_usec; |
110 | if ((res)->tv_usec < 0) { |
115 | if ((res)->tv_usec < 0) { |
111 | (res)->tv_sec--; |
116 | (res)->tv_sec--; |
112 | (res)->tv_usec += 1000000; |
117 | (res)->tv_usec += 1000000; |
113 | } |
118 | } |
114 | // __menuet__debug_out("Timersub\n"); |
119 | // DBG("Timersub\n"); |
115 | } |
120 | } |
Line 116... | Line 121... | ||
116 | 121 | ||
Line 117... | Line 122... | ||
117 | 122 | ||
Line 118... | Line 123... | ||
118 | 123 | ||
Line 119... | Line 124... | ||
119 | int timerisset(struct timeval *tvp){ |
124 | int timerisset(struct timeval *tvp){ |
Line 120... | Line 125... | ||
120 | 125 | ||
Line 121... | Line 126... | ||
121 | //__menuet__debug_out("Timer is set?\n"); |
126 | //DBG("Timer is set?\n"); |
Line 122... | Line 127... | ||
122 | 127 | ||
123 | return ((tvp)->tv_sec || (tvp)->tv_usec); |
128 | return ((tvp)->tv_sec || (tvp)->tv_usec); |
Line 124... | Line 129... | ||
124 | 129 | ||
Line 125... | Line 130... | ||
125 | } |
130 | } |
126 | 131 | ||
Line 127... | Line 132... | ||
127 | int timercmp(struct timeval *a, struct timeval *b, int z){ |
132 | int timercmp(struct timeval *a, struct timeval *b, int z){ |
128 | 133 | ||
129 | //__menuet__debug_out("Timercmp is a MACRO \n"); |
134 | //DBG("Timercmp is a MACRO \n"); |
130 | 135 | ||
Line 131... | Line 136... | ||
131 | if (a->tv_sec > b->tv_sec) return 1; //was 1 |
136 | if (a->tv_sec > b->tv_sec) return 1; //was 1 |
132 | return 0;} |
137 | return 0;} |
133 | 138 | ||
134 | int wctomb(char *s, int wchar){ |
139 | int wctomb(char *s, int wchar){ |
Line 135... | Line 140... | ||
135 | 140 | ||
136 | __menuet__debug_out("wctomb\n"); |
141 | DBG("wctomb\n"); |
137 | return 0;} |
142 | return 0;} |