e1f99f2b |
1 | #include <stdio.h> |
2 | #include <stdlib.h> |
3 | #include <string.h> |
4 | |
b6820926 |
5 | #include "common.h" |
e1f99f2b |
6 | #include "input.h" |
3b13ec65 |
7 | #include "../linux/in_evdev.h" |
e1f99f2b |
8 | |
9 | typedef struct |
10 | { |
11 | int drv_id; |
12 | void *drv_data; |
e1f99f2b |
13 | char *name; |
f484a9fe |
14 | int *binds; |
e1f99f2b |
15 | int probed:1; |
e1f99f2b |
16 | } in_dev_t; |
17 | |
819ef025 |
18 | static in_drv_t in_drivers[IN_DRVID_COUNT]; |
e1f99f2b |
19 | static in_dev_t in_devices[IN_MAX_DEVS]; |
20 | static int in_dev_count = 0; |
21 | |
819ef025 |
22 | #define DRV(id) in_drivers[(unsigned)(id) < IN_DRVID_COUNT ? (id) : 0] |
23 | |
e1f99f2b |
24 | static int in_bind_count(int drv_id) |
25 | { |
819ef025 |
26 | int count = DRV(drv_id).get_bind_count(); |
e1f99f2b |
27 | if (count <= 0) |
28 | printf("input: failed to get bind count for drv %d\n", drv_id); |
29 | |
30 | return count; |
31 | } |
32 | |
33 | static int *in_alloc_binds(int drv_id) |
34 | { |
819ef025 |
35 | int count, *binds; |
e1f99f2b |
36 | |
37 | count = in_bind_count(drv_id); |
819ef025 |
38 | if (count <= 0) |
e1f99f2b |
39 | return NULL; |
e1f99f2b |
40 | |
819ef025 |
41 | binds = calloc(count * 2, sizeof(binds[0])); |
42 | if (binds == NULL) |
43 | return NULL; |
44 | |
45 | DRV(drv_id).get_def_binds(binds + count); |
46 | memcpy(binds, binds + count, count * sizeof(binds[0])); |
47 | |
48 | return binds; |
e1f99f2b |
49 | } |
50 | |
51 | static void in_free(in_dev_t *dev) |
52 | { |
819ef025 |
53 | if (dev->probed) |
54 | DRV(dev->drv_id).free(dev->drv_data); |
e1f99f2b |
55 | dev->probed = 0; |
56 | dev->drv_data = NULL; |
57 | free(dev->name); |
58 | dev->name = NULL; |
59 | free(dev->binds); |
60 | dev->binds = NULL; |
61 | } |
62 | |
63 | /* to be called by drivers */ |
64 | void in_register(const char *nname, int drv_id, void *drv_data) |
65 | { |
819ef025 |
66 | int i, ret, dupe_count = 0, *binds; |
e1f99f2b |
67 | char name[256], *name_end, *tmp; |
68 | |
69 | strncpy(name, nname, sizeof(name)); |
70 | name[sizeof(name)-12] = 0; |
71 | name_end = name + strlen(name); |
72 | |
73 | for (i = 0; i < in_dev_count; i++) |
74 | { |
75 | if (in_devices[i].name == NULL) |
76 | continue; |
77 | if (strcmp(in_devices[i].name, name) == 0) |
78 | { |
79 | if (in_devices[i].probed) { |
80 | dupe_count++; |
81 | sprintf(name_end, " [%d]", dupe_count); |
82 | continue; |
83 | } |
84 | goto update; |
85 | } |
86 | } |
87 | |
88 | if (i >= IN_MAX_DEVS) |
89 | { |
90 | /* try to find unused device */ |
91 | for (i = 0; i < IN_MAX_DEVS; i++) |
92 | if (!in_devices[i].probed) break; |
93 | if (i >= IN_MAX_DEVS) { |
94 | printf("input: too many devices, can't add %s\n", name); |
95 | return; |
96 | } |
97 | in_free(&in_devices[i]); |
98 | } |
99 | |
100 | tmp = strdup(name); |
101 | if (tmp == NULL) |
102 | return; |
103 | |
104 | binds = in_alloc_binds(drv_id); |
105 | if (binds == NULL) { |
106 | free(tmp); |
107 | return; |
108 | } |
109 | |
110 | in_devices[i].name = tmp; |
111 | in_devices[i].binds = binds; |
112 | if (i + 1 > in_dev_count) |
113 | in_dev_count = i + 1; |
114 | |
115 | printf("input: new device #%d \"%s\"\n", i, name); |
116 | update: |
117 | in_devices[i].probed = 1; |
118 | in_devices[i].drv_id = drv_id; |
119 | in_devices[i].drv_data = drv_data; |
819ef025 |
120 | |
121 | if (in_devices[i].binds != NULL) { |
122 | ret = DRV(drv_id).clean_binds(drv_data, in_devices[i].binds); |
123 | if (ret == 0) { |
124 | /* no useable binds */ |
125 | free(in_devices[i].binds); |
126 | in_devices[i].binds = NULL; |
127 | } |
128 | } |
e1f99f2b |
129 | } |
130 | |
131 | void in_probe(void) |
132 | { |
133 | int i; |
134 | for (i = 0; i < in_dev_count; i++) |
135 | in_devices[i].probed = 0; |
136 | |
819ef025 |
137 | for (i = 1; i < IN_DRVID_COUNT; i++) |
138 | in_drivers[i].probe(); |
e1f99f2b |
139 | |
140 | /* get rid of devs without binds and probes */ |
141 | for (i = 0; i < in_dev_count; i++) { |
142 | if (!in_devices[i].probed && in_devices[i].binds == NULL) { |
143 | in_dev_count--; |
144 | if (i < in_dev_count) { |
145 | free(in_devices[i].name); |
146 | memmove(&in_devices[i], &in_devices[i+1], |
147 | (in_dev_count - i) * sizeof(in_devices[0])); |
148 | } |
149 | } |
150 | } |
151 | } |
152 | |
e1f99f2b |
153 | int in_update(void) |
154 | { |
155 | int i, result = 0; |
156 | |
157 | for (i = 0; i < in_dev_count; i++) { |
f484a9fe |
158 | in_dev_t *dev = &in_devices[i]; |
f484a9fe |
159 | if (dev->probed && dev->binds != NULL) { |
160 | switch (dev->drv_id) { |
819ef025 |
161 | #ifdef IN_EVDEV |
3427e573 |
162 | case IN_DRVID_EVDEV: |
483230c7 |
163 | result |= in_evdev_update(dev->drv_data, dev->binds); |
3427e573 |
164 | break; |
819ef025 |
165 | #endif |
3427e573 |
166 | } |
e1f99f2b |
167 | } |
168 | } |
169 | |
170 | return result; |
171 | } |
172 | |
3427e573 |
173 | static void **in_collect_drvdata(int drv_id, int *count) |
174 | { |
175 | static void *data[IN_MAX_DEVS]; |
176 | int i; |
177 | |
178 | for (*count = i = 0; i < in_dev_count; i++) { |
179 | if (in_devices[i].drv_id == drv_id && in_devices[i].probed) |
180 | data[(*count)++] = in_devices[i].drv_data; |
181 | } |
182 | |
183 | return data; |
184 | } |
185 | |
f484a9fe |
186 | static int menu_key_state = 0; |
187 | |
3427e573 |
188 | void in_set_blocking(int is_blocking) |
189 | { |
190 | int i; |
191 | |
192 | for (i = 0; i < in_dev_count; i++) { |
819ef025 |
193 | if (in_devices[i].probed) |
194 | DRV(in_devices[i].drv_id).set_blocking(in_devices[i].drv_data, is_blocking); |
3427e573 |
195 | } |
f484a9fe |
196 | |
197 | menu_key_state = 0; |
198 | /* flush events */ |
b6820926 |
199 | in_update_keycode(NULL, NULL, 0); |
3427e573 |
200 | } |
201 | |
3b13ec65 |
202 | /* |
3427e573 |
203 | * update with wait for a press, return keycode |
3b13ec65 |
204 | * only can use 1 drv here.. |
205 | */ |
f484a9fe |
206 | int in_update_keycode(int *dev_id_out, int *is_down_out, int timeout_ms) |
3b13ec65 |
207 | { |
b6820926 |
208 | int result = 0, dev_id = 0, is_down, result_menu; |
3b13ec65 |
209 | #ifdef IN_EVDEV |
3427e573 |
210 | void **data; |
211 | int i, id = 0, count = 0; |
3b13ec65 |
212 | |
3427e573 |
213 | data = in_collect_drvdata(IN_DRVID_EVDEV, &count); |
3b13ec65 |
214 | if (count == 0) { |
215 | /* don't deadlock, fail */ |
216 | printf("input: failed to find devices to read\n"); |
217 | exit(1); |
218 | } |
219 | |
f484a9fe |
220 | result = in_evdev_update_keycode(data, count, &id, &is_down, timeout_ms); |
3427e573 |
221 | |
f484a9fe |
222 | for (i = id; i < in_dev_count; i++) { |
223 | if (in_devices[i].drv_data == data[id]) { |
224 | dev_id = i; |
225 | break; |
3427e573 |
226 | } |
227 | } |
3b13ec65 |
228 | #else |
229 | #error no menu read handlers |
230 | #endif |
231 | |
f484a9fe |
232 | /* keep track of menu key state, to allow mixing |
b6820926 |
233 | * in_update_keycode() and in_menu_wait_any() calls */ |
f484a9fe |
234 | result_menu = DRV(in_devices[dev_id].drv_id).menu_translate(result); |
235 | if (result_menu != 0) { |
236 | if (is_down) |
237 | menu_key_state |= result_menu; |
238 | else |
239 | menu_key_state &= ~result_menu; |
240 | } |
241 | |
242 | if (dev_id_out != NULL) |
243 | *dev_id_out = dev_id; |
244 | if (is_down_out != NULL) |
245 | *is_down_out = is_down; |
3b13ec65 |
246 | return result; |
247 | } |
248 | |
b6820926 |
249 | /* same as above, only return bitfield of PBTN_* */ |
250 | int in_menu_wait_any(int timeout_ms) |
3427e573 |
251 | { |
f484a9fe |
252 | int keys_old = menu_key_state; |
3427e573 |
253 | |
254 | while (1) |
255 | { |
819ef025 |
256 | int code, is_down = 0, dev_id = 0; |
3427e573 |
257 | |
f484a9fe |
258 | code = in_update_keycode(&dev_id, &is_down, timeout_ms); |
259 | code = DRV(in_devices[dev_id].drv_id).menu_translate(code); |
3427e573 |
260 | |
b6820926 |
261 | if (timeout_ms >= 0) |
f484a9fe |
262 | break; |
263 | if (code == 0) |
264 | continue; |
265 | if (keys_old != menu_key_state) |
3427e573 |
266 | break; |
267 | } |
268 | |
f484a9fe |
269 | return menu_key_state; |
3427e573 |
270 | } |
271 | |
b6820926 |
272 | /* wait for menu input, do autorepeat */ |
273 | int in_menu_wait(int interesting) |
274 | { |
275 | static int inp_prev = 0; |
299acadc |
276 | static int repeats = 0; |
277 | int ret, release = 0, wait = 666; |
b6820926 |
278 | |
299acadc |
279 | if (repeats) |
280 | wait = 33; |
b6820926 |
281 | |
299acadc |
282 | ret = in_menu_wait_any(wait); |
283 | if (ret == inp_prev) |
284 | repeats++; |
b6820926 |
285 | |
286 | while (!(ret & interesting)) { |
287 | ret = in_menu_wait_any(-1); |
288 | release = 1; |
289 | } |
290 | |
299acadc |
291 | if (release || ret != inp_prev) |
b6820926 |
292 | repeats = 0; |
299acadc |
293 | |
b6820926 |
294 | inp_prev = ret; |
295 | |
299acadc |
296 | /* we don't need diagonals in menus */ |
b6820926 |
297 | if ((ret & PBTN_UP) && (ret & PBTN_LEFT)) ret &= ~PBTN_LEFT; |
298 | if ((ret & PBTN_UP) && (ret & PBTN_RIGHT)) ret &= ~PBTN_RIGHT; |
299 | if ((ret & PBTN_DOWN) && (ret & PBTN_LEFT)) ret &= ~PBTN_LEFT; |
300 | if ((ret & PBTN_DOWN) && (ret & PBTN_RIGHT)) ret &= ~PBTN_RIGHT; |
301 | |
302 | return ret; |
303 | } |
304 | |
819ef025 |
305 | const int *in_get_dev_binds(int dev_id) |
306 | { |
307 | if (dev_id < 0 || dev_id >= IN_MAX_DEVS) |
308 | return NULL; |
309 | |
310 | return in_devices[dev_id].binds; |
311 | } |
312 | |
313 | const int *in_get_dev_def_binds(int dev_id) |
314 | { |
315 | int count; |
316 | |
317 | if (dev_id < 0 || dev_id >= IN_MAX_DEVS) |
318 | return NULL; |
319 | |
320 | count = in_bind_count(in_devices[dev_id].drv_id); |
321 | return in_devices[dev_id].binds + count; |
322 | } |
323 | |
324 | int in_get_dev_bind_count(int dev_id) |
325 | { |
326 | if (dev_id < 0 || dev_id >= IN_MAX_DEVS) |
327 | return 0; |
328 | |
329 | return in_bind_count(in_devices[dev_id].drv_id); |
330 | } |
331 | |
b6820926 |
332 | const char *in_get_dev_name(int dev_id, int must_be_active) |
819ef025 |
333 | { |
334 | if (dev_id < 0 || dev_id >= IN_MAX_DEVS) |
335 | return NULL; |
336 | |
b6820926 |
337 | if (must_be_active && !in_devices[dev_id].probed) |
338 | return NULL; |
819ef025 |
339 | return in_devices[dev_id].name; |
340 | } |
341 | |
f484a9fe |
342 | /* never returns NULL */ |
3427e573 |
343 | const char *in_get_key_name(int dev_id, int keycode) |
344 | { |
f484a9fe |
345 | static char xname[16]; |
346 | const char *name; |
347 | |
3427e573 |
348 | if (dev_id < 0 || dev_id >= IN_MAX_DEVS) |
349 | return "Unkn0"; |
819ef025 |
350 | |
f484a9fe |
351 | name = DRV(in_devices[dev_id].drv_id).get_key_name(keycode); |
352 | if (name != NULL) |
353 | return name; |
354 | |
355 | /* assume scancode */ |
356 | if ((keycode >= '0' && keycode <= '9') || (keycode >= 'a' && keycode <= 'z') |
357 | || (keycode >= 'A' && keycode <= 'Z')) |
358 | sprintf(xname, "%c", keycode); |
359 | else |
360 | sprintf(xname, "\\x%02X", keycode); |
361 | return xname; |
362 | } |
363 | |
364 | int in_bind_key(int dev_id, int keycode, int mask, int force_unbind) |
365 | { |
366 | int ret, count; |
367 | in_dev_t *dev; |
368 | |
369 | if (dev_id < 0 || dev_id >= IN_MAX_DEVS) |
370 | return -1; |
371 | dev = &in_devices[dev_id]; |
372 | |
373 | if (dev->binds == NULL) { |
374 | if (force_unbind) |
375 | return 0; |
376 | dev->binds = in_alloc_binds(dev->drv_id); |
377 | if (dev->binds == NULL) |
378 | return -1; |
379 | } |
380 | |
381 | count = in_bind_count(dev->drv_id); |
382 | if (keycode < 0 || keycode >= count) |
383 | return -1; |
384 | |
385 | if (force_unbind) |
386 | dev->binds[keycode] &= ~mask; |
387 | else |
388 | dev->binds[keycode] ^= mask; |
389 | |
390 | ret = DRV(dev->drv_id).clean_binds(dev->drv_data, dev->binds); |
391 | if (ret == 0) { |
392 | free(dev->binds); |
393 | dev->binds = NULL; |
394 | } |
395 | |
396 | return 0; |
819ef025 |
397 | } |
398 | |
399 | /* returns device id, or -1 on error */ |
400 | int in_config_parse_dev(const char *name) |
401 | { |
402 | int drv_id = -1, i; |
403 | |
404 | for (i = 0; i < IN_DRVID_COUNT; i++) { |
405 | int len = strlen(in_drivers[i].prefix); |
406 | if (strncmp(name, in_drivers[i].prefix, len) == 0) { |
407 | drv_id = i; |
408 | break; |
409 | } |
410 | } |
411 | |
412 | if (drv_id < 0) { |
413 | printf("input: missing driver for %s\n", name); |
414 | return -1; |
415 | } |
416 | |
417 | for (i = 0; i < in_dev_count; i++) |
418 | { |
419 | if (in_devices[i].name == NULL) |
420 | continue; |
421 | if (strcmp(in_devices[i].name, name) == 0) |
422 | return i; |
423 | } |
424 | |
425 | if (i >= IN_MAX_DEVS) |
426 | { |
427 | /* try to find unused device */ |
428 | for (i = 0; i < IN_MAX_DEVS; i++) |
429 | if (in_devices[i].name == NULL) break; |
430 | if (i >= IN_MAX_DEVS) { |
431 | printf("input: too many devices, can't add %s\n", name); |
432 | return -1; |
433 | } |
434 | } |
435 | |
436 | memset(&in_devices[i], 0, sizeof(in_devices[i])); |
437 | |
438 | in_devices[i].name = strdup(name); |
439 | if (in_devices[i].name == NULL) |
440 | return -1; |
441 | |
442 | if (i + 1 > in_dev_count) |
443 | in_dev_count = i + 1; |
444 | in_devices[i].drv_id = drv_id; |
445 | |
446 | return i; |
447 | } |
448 | |
299acadc |
449 | /* |
450 | * To reduce size of game specific configs, default binds are not saved. |
451 | * So we mark default binds in in_config_start(), override them in in_config_bind_key(), |
452 | * and restore whatever default binds are left in in_config_end(). |
453 | */ |
819ef025 |
454 | void in_config_start(void) |
455 | { |
456 | int i; |
457 | |
458 | /* mark all default binds, so they get overwritten by func below */ |
459 | for (i = 0; i < IN_MAX_DEVS; i++) { |
460 | int n, count, *binds, *def_binds; |
461 | |
f484a9fe |
462 | binds = in_devices[i].binds; |
463 | if (binds == NULL) |
819ef025 |
464 | continue; |
465 | |
466 | count = in_bind_count(in_devices[i].drv_id); |
819ef025 |
467 | def_binds = binds + count; |
468 | |
469 | for (n = 0; n < count; n++) |
470 | if (binds[n] == def_binds[n]) |
471 | binds[n] = -1; |
472 | } |
473 | } |
474 | |
475 | int in_config_bind_key(int dev_id, const char *key, int binds) |
476 | { |
f484a9fe |
477 | int count, kc; |
478 | in_dev_t *dev; |
819ef025 |
479 | |
480 | if (dev_id < 0 || dev_id >= IN_MAX_DEVS) |
481 | return -1; |
f484a9fe |
482 | dev = &in_devices[dev_id]; |
819ef025 |
483 | |
f484a9fe |
484 | count = in_bind_count(dev->drv_id); |
485 | |
486 | /* maybe a raw code? */ |
487 | if (key[0] == '\\' && key[1] == 'x') { |
488 | char *p = NULL; |
489 | kc = (int)strtoul(key + 2, &p, 16); |
490 | if (p == NULL || *p != 0) |
491 | kc = -1; |
492 | } |
493 | else { |
494 | /* device specific key name */ |
495 | if (dev->binds == NULL) { |
496 | dev->binds = in_alloc_binds(dev->drv_id); |
497 | if (dev->binds == NULL) |
498 | return -1; |
499 | in_config_start(); |
500 | } |
501 | |
502 | kc = DRV(dev->drv_id).get_key_code(key); |
503 | if (kc < 0 && strlen(key) == 1) { |
504 | /* assume scancode */ |
505 | kc = key[0]; |
506 | } |
819ef025 |
507 | } |
508 | |
f484a9fe |
509 | if (kc < 0 || kc >= count) { |
819ef025 |
510 | printf("input: bad key: %s\n", key); |
511 | return -1; |
3427e573 |
512 | } |
513 | |
f484a9fe |
514 | if (dev->binds[kc] == -1) |
515 | dev->binds[kc] = 0; |
516 | dev->binds[kc] |= binds; |
819ef025 |
517 | |
518 | return 0; |
519 | } |
520 | |
521 | void in_config_end(void) |
522 | { |
523 | int i; |
524 | |
525 | for (i = 0; i < IN_MAX_DEVS; i++) { |
526 | int n, ret, count, *binds, *def_binds; |
f484a9fe |
527 | in_dev_t *dev = &in_devices[i]; |
819ef025 |
528 | |
f484a9fe |
529 | if (dev->binds == NULL) |
819ef025 |
530 | continue; |
531 | |
f484a9fe |
532 | count = in_bind_count(dev->drv_id); |
533 | binds = dev->binds; |
819ef025 |
534 | def_binds = binds + count; |
535 | |
536 | for (n = 0; n < count; n++) |
537 | if (binds[n] == -1) |
538 | binds[n] = def_binds[n]; |
539 | |
f484a9fe |
540 | if (dev->drv_data == NULL) |
819ef025 |
541 | continue; |
542 | |
f484a9fe |
543 | ret = DRV(dev->drv_id).clean_binds(dev->drv_data, binds); |
819ef025 |
544 | if (ret == 0) { |
545 | /* no useable binds */ |
f484a9fe |
546 | free(dev->binds); |
547 | dev->binds = NULL; |
819ef025 |
548 | } |
549 | } |
3427e573 |
550 | } |
551 | |
819ef025 |
552 | void in_debug_dump(void) |
553 | { |
554 | int i; |
555 | |
556 | printf("# drv probed binds name\n"); |
557 | for (i = 0; i < IN_MAX_DEVS; i++) { |
558 | in_dev_t *d = &in_devices[i]; |
559 | if (!d->probed && d->name == NULL && d->binds == NULL) |
560 | continue; |
561 | printf("%d %3d %6c %5c %s\n", i, d->drv_id, d->probed ? 'y' : 'n', |
562 | d->binds ? 'y' : 'n', d->name); |
563 | } |
564 | } |
565 | |
566 | /* handlers for unknown/not_preset drivers */ |
567 | |
568 | static void in_def_probe(void) {} |
569 | static void in_def_free(void *drv_data) {} |
570 | static int in_def_get_bind_count(void) { return 0; } |
571 | static void in_def_get_def_binds(int *binds) {} |
572 | static int in_def_clean_binds(void *drv_data, int *binds) { return 0; } |
573 | static void in_def_set_blocking(void *data, int y) {} |
574 | static int in_def_menu_translate(int keycode) { return keycode; } |
575 | static int in_def_get_key_code(const char *key_name) { return 0; } |
576 | static const char *in_def_get_key_name(int keycode) { return NULL; } |
577 | |
e1f99f2b |
578 | void in_init(void) |
579 | { |
819ef025 |
580 | int i; |
581 | |
582 | memset(in_drivers, 0, sizeof(in_drivers)); |
e1f99f2b |
583 | memset(in_devices, 0, sizeof(in_devices)); |
584 | in_dev_count = 0; |
819ef025 |
585 | |
586 | for (i = 0; i < IN_DRVID_COUNT; i++) { |
587 | in_drivers[i].prefix = "none:"; |
588 | in_drivers[i].probe = in_def_probe; |
589 | in_drivers[i].free = in_def_free; |
590 | in_drivers[i].get_bind_count = in_def_get_bind_count; |
591 | in_drivers[i].get_def_binds = in_def_get_def_binds; |
592 | in_drivers[i].clean_binds = in_def_clean_binds; |
593 | in_drivers[i].set_blocking = in_def_set_blocking; |
594 | in_drivers[i].menu_translate = in_def_menu_translate; |
595 | in_drivers[i].get_key_code = in_def_get_key_code; |
596 | in_drivers[i].get_key_name = in_def_get_key_name; |
597 | } |
598 | |
599 | #ifdef IN_EVDEV |
600 | in_evdev_init(&in_drivers[IN_DRVID_EVDEV]); |
601 | #endif |
e1f99f2b |
602 | } |
603 | |
819ef025 |
604 | #if 0 |
e1f99f2b |
605 | int main(void) |
606 | { |
3b13ec65 |
607 | int ret; |
608 | |
e1f99f2b |
609 | in_init(); |
610 | in_probe(); |
611 | |
3427e573 |
612 | in_set_blocking(1); |
613 | |
614 | #if 1 |
615 | while (1) { |
616 | int dev = 0, down; |
617 | ret = in_update_keycode(&dev, &down); |
618 | printf("#%i: %i %i (%s)\n", dev, down, ret, in_get_key_name(dev, ret)); |
619 | } |
620 | #else |
e1f99f2b |
621 | while (1) { |
b6820926 |
622 | ret = in_menu_wait_any(); |
3b13ec65 |
623 | printf("%08x\n", ret); |
e1f99f2b |
624 | } |
3427e573 |
625 | #endif |
e1f99f2b |
626 | |
627 | return 0; |
628 | } |
819ef025 |
629 | #endif |