/[LeafOK_CVS]/lbbs/include/menu.h
ViewVC logotype

Diff of /lbbs/include/menu.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.28 by sysadm, Wed Jun 25 01:50:14 2025 UTC Revision 1.31 by sysadm, Sat Oct 18 12:06:10 2025 UTC
# Line 25  Line 25 
25  #define MAX_MENU_NAME_LENGTH 30  #define MAX_MENU_NAME_LENGTH 30
26  #define MAX_ITEMS_PER_MENU 256  #define MAX_ITEMS_PER_MENU 256
27  #define MAX_MENUITEM_NAME_LENGTH 256  #define MAX_MENUITEM_NAME_LENGTH 256
28  #define MAX_MENUITEM_TEXT_LENGTH 100  #define MAX_MENUITEM_TEXT_LENGTH 200
29  #define MAX_MENUITEM_ACTION_LENGTH 30  #define MAX_MENUITEM_ACTION_LENGTH 30
30  #define MAX_MENUTITLE_TEXT_LENGTH 50  #define MAX_MENUTITLE_TEXT_LENGTH 100
31  #define MAX_MENU_SCR_NAME_LENGTH 20  #define MAX_MENU_SCR_NAME_LENGTH 20
32  #define MAX_MENU_SCR_BUF_LENGTH 2000  #define MAX_MENU_SCR_BUF_LENGTH 2000
33  #define MAX_MENUS 256  #define MAX_MENUS 256
# Line 110  struct menu_set_t Line 110  struct menu_set_t
110  typedef struct menu_set_t MENU_SET;  typedef struct menu_set_t MENU_SET;
111    
112  extern MENU_SET bbs_menu;  extern MENU_SET bbs_menu;
113    extern MENU_SET top10_menu;
114    
115  extern int load_menu(MENU_SET *p_menu_set, const char *conf_file);  extern int load_menu(MENU_SET *p_menu_set, const char *conf_file);
116  extern int unload_menu(MENU_SET *p_menu_set);  extern int unload_menu(MENU_SET *p_menu_set);
# Line 138  inline MENU *get_menu_by_id(MENU_SET *p_ Line 139  inline MENU *get_menu_by_id(MENU_SET *p_
139                  return NULL;                  return NULL;
140          }          }
141    
142          return (p_menu_set->p_menu_pool + sizeof(MENU) * menu_id);          return (MENU *)((char *)(p_menu_set->p_menu_pool) + sizeof(MENU) * menu_id);
143  }  }
144    
145  inline MENU_ITEM *get_menu_item_by_id(MENU_SET *p_menu_set, MENU_ITEM_ID menu_item_id)  inline MENU_ITEM *get_menu_item_by_id(MENU_SET *p_menu_set, MENU_ITEM_ID menu_item_id)
# Line 148  inline MENU_ITEM *get_menu_item_by_id(ME Line 149  inline MENU_ITEM *get_menu_item_by_id(ME
149                  return NULL;                  return NULL;
150          }          }
151    
152          return (p_menu_set->p_menu_item_pool + sizeof(MENU_ITEM) * menu_item_id);          return (MENU_ITEM *)((char *)(p_menu_set->p_menu_item_pool) + sizeof(MENU_ITEM) * menu_item_id);
153  }  }
154    
155  inline MENU_SCREEN *get_menu_screen_by_id(MENU_SET *p_menu_set, MENU_SCREEN_ID menu_screen_id)  inline MENU_SCREEN *get_menu_screen_by_id(MENU_SET *p_menu_set, MENU_SCREEN_ID menu_screen_id)
# Line 158  inline MENU_SCREEN *get_menu_screen_by_i Line 159  inline MENU_SCREEN *get_menu_screen_by_i
159                  return NULL;                  return NULL;
160          }          }
161    
162          return (p_menu_set->p_menu_screen_pool + sizeof(MENU_ITEM) * menu_screen_id);          return (MENU_SCREEN *)((char *)(p_menu_set->p_menu_screen_pool) + sizeof(MENU_ITEM) * menu_screen_id);
163  }  }
164    
165  #endif //_MENU_H_  #endif //_MENU_H_


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1