/[LeafOK_CVS]/lbbs/src/menu.c
ViewVC logotype

Diff of /lbbs/src/menu.c

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

Revision 1.56 by sysadm, Sun May 25 06:53:29 2025 UTC Revision 1.60 by sysadm, Wed May 28 10:26:21 2025 UTC
# Line 864  static int display_menu_current_page(MEN Line 864  static int display_menu_current_page(MEN
864          {          {
865                  if (p_menu->title.row == 0 && p_menu->title.col == 0)                  if (p_menu->title.row == 0 && p_menu->title.col == 0)
866                  {                  {
867                          show_top(p_menu->title.text);                          show_top(p_menu->title.text, BBS_name, "");
868                  }                  }
869                  else                  else
870                  {                  {
# Line 1116  int menu_control(MENU_SET *p_menu_set, i Line 1116  int menu_control(MENU_SET *p_menu_set, i
1116                          return ((*(p_menu_item->action_cmd_handler))((void *)(p_menu_item->name)));                          return ((*(p_menu_item->action_cmd_handler))((void *)(p_menu_item->name)));
1117                  }                  }
1118                  break;                  break;
1119            case KEY_ESC:
1120          case KEY_LEFT:          case KEY_LEFT:
1121                  if (p_menu_set->choose_step > 0)                  if (p_menu_set->choose_step > 0)
1122                  {                  {
# Line 1306  int menu_control(MENU_SET *p_menu_set, i Line 1307  int menu_control(MENU_SET *p_menu_set, i
1307    
1308  int unload_menu(MENU_SET *p_menu_set)  int unload_menu(MENU_SET *p_menu_set)
1309  {  {
1310            int shmid;
1311    
1312            if (p_menu_set == NULL)
1313            {
1314                    return -1;
1315            }
1316    
1317          if (p_menu_set->p_menu_name_dict != NULL)          if (p_menu_set->p_menu_name_dict != NULL)
1318          {          {
1319                  trie_dict_destroy(p_menu_set->p_menu_name_dict);                  trie_dict_destroy(p_menu_set->p_menu_name_dict);
# Line 1318  int unload_menu(MENU_SET *p_menu_set) Line 1326  int unload_menu(MENU_SET *p_menu_set)
1326                  p_menu_set->p_menu_screen_dict = NULL;                  p_menu_set->p_menu_screen_dict = NULL;
1327          }          }
1328    
1329            shmid = p_menu_set->shmid;
1330    
1331          detach_menu_shm(p_menu_set);          detach_menu_shm(p_menu_set);
1332    
1333          if (shmctl(p_menu_set->shmid, IPC_RMID, NULL) == -1)          if (shmctl(shmid, IPC_RMID, NULL) == -1)
1334          {          {
1335                  log_error("shmctl(shmid=%d, IPC_RMID) error (%d)\n", p_menu_set->shmid, errno);                  log_error("shmctl(shmid=%d, IPC_RMID) error (%d)\n", shmid, errno);
1336                  return -1;                  return -1;
1337          }          }
1338    
# Line 1337  int set_menu_shm_readonly(MENU_SET *p_me Line 1347  int set_menu_shm_readonly(MENU_SET *p_me
1347          p_shm = shmat(p_menu_set->shmid, p_menu_set->p_reserved, SHM_RDONLY | SHM_REMAP);          p_shm = shmat(p_menu_set->shmid, p_menu_set->p_reserved, SHM_RDONLY | SHM_REMAP);
1348          if (p_shm == (void *)-1)          if (p_shm == (void *)-1)
1349          {          {
1350                  log_error("shmat() error (%d)\n", errno);                  log_error("shmat(menu_shm shmid = %d) error (%d)\n", p_menu_set->shmid, errno);
1351                  return -1;                  return -1;
1352          }          }
1353                    


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

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