| 26 |
#include "menu.h" |
#include "menu.h" |
| 27 |
#include "section_list_display.h" |
#include "section_list_display.h" |
| 28 |
#include "screen.h" |
#include "screen.h" |
| 29 |
|
#include "user_list_display.h" |
| 30 |
#include "user_priv.h" |
#include "user_priv.h" |
| 31 |
#include <dlfcn.h> |
#include <dlfcn.h> |
| 32 |
#include <errno.h> |
#include <errno.h> |
| 44 |
return REDRAW; |
return REDRAW; |
| 45 |
} |
} |
| 46 |
|
|
| 47 |
|
typedef union exec_handler_t{ |
| 48 |
|
void *p; |
| 49 |
|
int (*handler)(); |
| 50 |
|
} exec_handler; |
| 51 |
|
|
| 52 |
int exec_mbem(void *param) |
int exec_mbem(void *param) |
| 53 |
{ |
{ |
| 54 |
void *hdll; |
void *hdll; |
| 55 |
int (*func)(); |
exec_handler func; |
| 56 |
char *c, *s; |
char *c, *s; |
| 57 |
char buf[FILE_PATH_LEN]; |
char buf[FILE_PATH_LEN]; |
| 58 |
|
|
| 75 |
{ |
{ |
| 76 |
char *error; |
char *error; |
| 77 |
|
|
| 78 |
if ((func = dlsym(hdll, c ? c : "mod_main")) != NULL) |
if ((func.p = dlsym(hdll, c ? c : "mod_main")) != NULL) |
| 79 |
func(); |
{ |
| 80 |
|
func.handler(); |
| 81 |
|
} |
| 82 |
else if ((error = dlerror()) != NULL) |
else if ((error = dlerror()) != NULL) |
| 83 |
{ |
{ |
| 84 |
clearscr(); |
clearscr(); |
| 343 |
} |
} |
| 344 |
|
|
| 345 |
return REDRAW; |
return REDRAW; |
| 346 |
|
} |
| 347 |
|
|
| 348 |
|
int list_user(void *param) |
| 349 |
|
{ |
| 350 |
|
if (user_list_display(0) < 0) |
| 351 |
|
{ |
| 352 |
|
log_error("user_list_display(all_user) error\n"); |
| 353 |
|
} |
| 354 |
|
|
| 355 |
|
return REDRAW; |
| 356 |
|
} |
| 357 |
|
|
| 358 |
|
int list_online_user(void *param) |
| 359 |
|
{ |
| 360 |
|
if (user_list_display(1) < 0) |
| 361 |
|
{ |
| 362 |
|
log_error("user_list_display(online_user) error\n"); |
| 363 |
|
} |
| 364 |
|
|
| 365 |
|
return REDRAW; |
| 366 |
} |
} |