/[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.35 by sysadm, Mon Oct 13 07:35:48 2025 UTC Revision 1.40 by sysadm, Fri Oct 17 12:23:01 2025 UTC
# Line 15  Line 15 
15   ***************************************************************************/   ***************************************************************************/
16    
17  #include "article_cache.h"  #include "article_cache.h"
18    #include "article_favor_display.h"
19  #include "article_view_log.h"  #include "article_view_log.h"
20  #include "bbs.h"  #include "bbs.h"
21  #include "bbs_cmd.h"  #include "bbs_cmd.h"
# Line 109  int copyright(void *param) Line 110  int copyright(void *param)
110          return REDRAW;          return REDRAW;
111  }  }
112    
113    int version(void *param)
114    {
115            display_file(DATA_VERSION, 1);
116    
117            return REDRAW;
118    }
119    
120  int reload_bbs_conf(void *param)  int reload_bbs_conf(void *param)
121  {  {
122          clearscr();          clearscr();
# Line 211  int list_ex_section(void *param) Line 219  int list_ex_section(void *param)
219  {  {
220          SECTION_LIST *p_section;          SECTION_LIST *p_section;
221    
222          p_section = section_list_find_by_name(param, NULL);          p_section = section_list_find_by_name(param);
223          if (p_section == NULL)          if (p_section == NULL)
224          {          {
225                  log_error("Section %s not found\n", (const char *)param);                  log_error("Section %s not found\n", (const char *)param);
# Line 236  int show_top10_menu(void *param) Line 244  int show_top10_menu(void *param)
244                  return NOREDRAW;                  return NOREDRAW;
245          }          }
246          show_top10 = 1;          show_top10 = 1;
247            
248          clearscr();          clearscr();
249          show_top("", BBS_name, "");          show_top("", BBS_name, "");
250          show_bottom("");          show_bottom("");
# Line 247  int show_top10_menu(void *param) Line 255  int show_top10_menu(void *param)
255                  {                  {
256                          iflush();                          iflush();
257                          ch = igetch(100);                          ch = igetch(100);
258    
259                            if (ch != KEY_NULL && ch != KEY_TIMEOUT)
260                            {
261                                    BBS_last_access_tm = time(NULL);
262                            }
263    
264                          switch (ch)                          switch (ch)
265                          {                          {
266                          case KEY_NULL: // broken pipe                          case KEY_NULL: // broken pipe
267                                    log_error("KEY_NULL\n");
268                                  show_top10 = 0;                                  show_top10 = 0;
269                                  return 0;                                  return 0;
270                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
271                                  if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)                                  if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)
272                                  {                                  {
273                                            log_error("User input timeout\n");
274                                          show_top10 = 0;                                          show_top10 = 0;
275                                          return 0;                                          return 0;
276                                  }                                  }
277                                  continue;                                  continue;
278                          case CR:                          case CR:
                                 igetch_reset();  
279                          default:                          default:
280                                  switch (menu_control(&top10_menu, ch))                                  switch (menu_control(&top10_menu, ch))
281                                  {                                  {
# Line 279  int show_top10_menu(void *param) Line 294  int show_top10_menu(void *param)
294                                  }                                  }
295                          }                          }
296    
                         BBS_last_access_tm = time(NULL);  
   
297                          if (ch == EXITMENU)                          if (ch == EXITMENU)
298                          {                          {
299                                  break;                                  break;
300                          }                          }
301                  }                  }
302          }          }
303            
304          show_top10 = 0;          show_top10 = 0;
305          return REDRAW;          return REDRAW;
306  }  }
# Line 316  int locate_article(void *param) Line 329  int locate_article(void *param)
329    
330  int favor_topic(void *param)  int favor_topic(void *param)
331  {  {
332          clearscr();          if (article_favor_display(&BBS_article_favor) < 0)
333          prints("此功能尚未实现");          {
334          press_any_key();                  log_error("article_favor_display() error\n");
335            }
336    
337          return REDRAW;          return REDRAW;
338  }  }


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

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