| 20 |
#include "common.h" |
#include "common.h" |
| 21 |
#include "io.h" |
#include "io.h" |
| 22 |
#include <dlfcn.h> |
#include <dlfcn.h> |
| 23 |
#include <time.h> |
#include <errno.h> |
| 24 |
|
#include <signal.h> |
| 25 |
#include <string.h> |
#include <string.h> |
| 26 |
|
#include <sys/types.h> |
| 27 |
|
#include <time.h> |
| 28 |
|
#include <unistd.h> |
| 29 |
|
|
| 30 |
int |
int |
| 31 |
exec_mbem(const char *str) |
exec_mbem(const char *str) |
| 53 |
func (); |
func (); |
| 54 |
else if ((error = dlerror ()) != NULL) { |
else if ((error = dlerror ()) != NULL) { |
| 55 |
clearscr (); |
clearscr (); |
| 56 |
prints ("%s\n", error); |
prints ("%s\r\n", error); |
| 57 |
press_any_key (); |
press_any_key (); |
| 58 |
} |
} |
| 59 |
dlclose (hdll); |
dlclose (hdll); |
| 60 |
} else { |
} else { |
| 61 |
clearscr (); |
clearscr (); |
| 62 |
prints ("加载库文件 [%s] 失败!!\n\n", s + 5); |
prints ("加载库文件 [%s] 失败!!\r\n", s + 5); |
| 63 |
prints ("失败原因:%s", dlerror()); |
prints ("失败原因:%s\r\n", dlerror()); |
| 64 |
press_any_key (); |
press_any_key (); |
| 65 |
} |
} |
| 66 |
} |
} |
| 89 |
int |
int |
| 90 |
copyright (const char *s) |
copyright (const char *s) |
| 91 |
{ |
{ |
| 92 |
char temp[256]; |
char temp[256]; |
| 93 |
|
|
| 94 |
strcpy (temp, app_home_dir); |
strcpy (temp, app_home_dir); |
| 95 |
strcat (temp, "data/copyright.txt"); |
strcat (temp, "data/copyright.txt"); |
| 96 |
display_file_ex (temp, 0, 1); |
display_file_ex (temp, 0, 1); |
| 97 |
|
|
| 98 |
return REDRAW; |
return REDRAW; |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
int |
| 102 |
|
reloadbbsmenu (const char *s) |
| 103 |
|
{ |
| 104 |
|
if (kill (getppid (), SIG_RELOAD_MENU) < 0) |
| 105 |
|
log_error ("Send SIG_RELOAD_MENU signal failed (%d)\n", errno); |
| 106 |
|
|
| 107 |
|
return REDRAW; |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
int |
| 111 |
|
shutdownbbs (const char *s) |
| 112 |
|
{ |
| 113 |
|
if (kill (0, SIGTERM) < 0) |
| 114 |
|
log_error ("Send SIGTERM signal failed (%d)\n", errno); |
| 115 |
|
|
| 116 |
|
return REDRAW; |
| 117 |
} |
} |