| 3 |
* menu |
* menu |
| 4 |
* - configurable user interactive menu feature |
* - configurable user interactive menu feature |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
| 40 |
MENU_SET bbs_menu; |
MENU_SET bbs_menu; |
| 41 |
MENU_SET top10_menu; |
MENU_SET top10_menu; |
| 42 |
|
|
| 43 |
|
// External definitions for inline functions |
| 44 |
|
extern inline MENU *get_menu(MENU_SET *p_menu_set, const char *menu_name); |
| 45 |
|
extern inline MENU *get_menu_by_id(MENU_SET *p_menu_set, MENU_ID menu_id); |
| 46 |
|
extern inline MENU_ITEM *get_menu_item_by_id(MENU_SET *p_menu_set, MENU_ITEM_ID menu_item_id); |
| 47 |
|
extern inline MENU_SCREEN *get_menu_screen_by_id(MENU_SET *p_menu_set, MENU_SCREEN_ID menu_screen_id); |
| 48 |
|
|
| 49 |
int load_menu(MENU_SET *p_menu_set, const char *conf_file) |
int load_menu(MENU_SET *p_menu_set, const char *conf_file) |
| 50 |
{ |
{ |
| 51 |
char filepath[FILE_PATH_LEN]; |
char filepath[FILE_PATH_LEN]; |
| 94 |
|
|
| 95 |
if ((fin = fopen(conf_file, "r")) == NULL) |
if ((fin = fopen(conf_file, "r")) == NULL) |
| 96 |
{ |
{ |
| 97 |
log_error("Open %s failed", conf_file); |
log_error("Open %s error: %d", conf_file, errno); |
| 98 |
return -2; |
return -2; |
| 99 |
} |
} |
| 100 |
|
|