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

Diff of /lbbs/src/menu_proc.c

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

Revision 1.51 by sysadm, Tue Nov 11 10:54:22 2025 UTC Revision 1.56 by sysadm, Sun Nov 23 04:28:24 2025 UTC
# Line 15  Line 15 
15  #include "article_view_log.h"  #include "article_view_log.h"
16  #include "bbs.h"  #include "bbs.h"
17  #include "bbs_cmd.h"  #include "bbs_cmd.h"
18    #include "bbs_net.h"
19    #include "chicken.h"
20  #include "common.h"  #include "common.h"
21  #include "io.h"  #include "io.h"
22  #include "log.h"  #include "log.h"
# Line 68  int exec_mbem(void *param) Line 70  int exec_mbem(void *param)
70                          c++;                          c++;
71                  }                  }
72    
73    #ifdef _ENABLE_SHARED
74                  hdll = dlopen(s + 5, RTLD_LAZY);                  hdll = dlopen(s + 5, RTLD_LAZY);
75    
76                  if (hdll)                  if (hdll)
# Line 93  int exec_mbem(void *param) Line 96  int exec_mbem(void *param)
96                          prints("失败原因:%s\r\n", dlerror());                          prints("失败原因:%s\r\n", dlerror());
97                          press_any_key();                          press_any_key();
98                  }                  }
99    #else
100                    (void)hdll;
101                    (void)func;
102    
103                    if (strcasecmp(c, "bbs_net") == 0)
104                    {
105                            bbs_net();
106                    }
107                    else if (strcasecmp(c, "chicken_main") == 0)
108                    {
109                            chicken_main();
110                    }
111                    else
112                    {
113                            clearscr();
114                            prints("未知入口 [%s] !!\r\n", c);
115                            press_any_key();
116                    }
117    #endif
118          }          }
119    
120          return REDRAW;          return REDRAW;
# Line 253  int show_top10_menu(void *param) Line 275  int show_top10_menu(void *param)
275  {  {
276          static int show_top10 = 0;          static int show_top10 = 0;
277          int ch = 0;          int ch = 0;
278            int loop;
279    
280          if (show_top10)          if (show_top10)
281          {          {
# Line 266  int show_top10_menu(void *param) Line 289  int show_top10_menu(void *param)
289    
290          if (display_menu(&top10_menu) == 0)          if (display_menu(&top10_menu) == 0)
291          {          {
292                  while (!SYS_server_exit)                  for (loop = 1; !SYS_server_exit && loop;)
293                  {                  {
294                          iflush();                          iflush();
295                          ch = igetch(100);                          ch = igetch(100);
# Line 280  int show_top10_menu(void *param) Line 303  int show_top10_menu(void *param)
303                          {                          {
304                          case KEY_NULL: // broken pipe                          case KEY_NULL: // broken pipe
305                                  log_error("KEY_NULL\n");                                  log_error("KEY_NULL\n");
306                                  show_top10 = 0;                                  loop = 0;
307                                  return 0;                                  break;
308                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
309                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
310                                  {                                  {
311                                          log_error("User input timeout\n");                                          log_error("User input timeout\n");
312                                          show_top10 = 0;                                          loop = 0;
313                                          return 0;                                          break;
314                                  }                                  }
315                                  continue;                                  continue;
316                          case CR:                          case CR:
# Line 295  int show_top10_menu(void *param) Line 318  int show_top10_menu(void *param)
318                                  switch (menu_control(&top10_menu, ch))                                  switch (menu_control(&top10_menu, ch))
319                                  {                                  {
320                                  case EXITMENU:                                  case EXITMENU:
321                                          ch = EXITMENU;                                          loop = 0;
322                                          break;                                          break;
323                                  case REDRAW:                                  case REDRAW:
324                                          clearscr();                                          clearscr();
# Line 308  int show_top10_menu(void *param) Line 331  int show_top10_menu(void *param)
331                                          break;                                          break;
332                                  }                                  }
333                          }                          }
   
                         if (ch == EXITMENU)  
                         {  
                                 break;  
                         }  
334                  }                  }
335          }          }
336    


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

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