/[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.39 by sysadm, Fri Oct 17 01:25:08 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 211  int list_ex_section(void *param) Line 212  int list_ex_section(void *param)
212  {  {
213          SECTION_LIST *p_section;          SECTION_LIST *p_section;
214    
215          p_section = section_list_find_by_name(param, NULL);          p_section = section_list_find_by_name(param);
216          if (p_section == NULL)          if (p_section == NULL)
217          {          {
218                  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 237  int show_top10_menu(void *param)
237                  return NOREDRAW;                  return NOREDRAW;
238          }          }
239          show_top10 = 1;          show_top10 = 1;
240            
241          clearscr();          clearscr();
242          show_top("", BBS_name, "");          show_top("", BBS_name, "");
243          show_bottom("");          show_bottom("");
# Line 247  int show_top10_menu(void *param) Line 248  int show_top10_menu(void *param)
248                  {                  {
249                          iflush();                          iflush();
250                          ch = igetch(100);                          ch = igetch(100);
251    
252                            if (ch != KEY_NULL && ch != KEY_TIMEOUT)
253                            {
254                                    BBS_last_access_tm = time(NULL);
255                            }
256    
257                          switch (ch)                          switch (ch)
258                          {                          {
259                          case KEY_NULL: // broken pipe                          case KEY_NULL: // broken pipe
260                                    log_error("KEY_NULL\n");
261                                  show_top10 = 0;                                  show_top10 = 0;
262                                  return 0;                                  return 0;
263                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
264                                  if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)                                  if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)
265                                  {                                  {
266                                            log_error("User input timeout\n");
267                                          show_top10 = 0;                                          show_top10 = 0;
268                                          return 0;                                          return 0;
269                                  }                                  }
270                                  continue;                                  continue;
271                          case CR:                          case CR:
                                 igetch_reset();  
272                          default:                          default:
273                                  switch (menu_control(&top10_menu, ch))                                  switch (menu_control(&top10_menu, ch))
274                                  {                                  {
# Line 279  int show_top10_menu(void *param) Line 287  int show_top10_menu(void *param)
287                                  }                                  }
288                          }                          }
289    
                         BBS_last_access_tm = time(NULL);  
   
290                          if (ch == EXITMENU)                          if (ch == EXITMENU)
291                          {                          {
292                                  break;                                  break;
293                          }                          }
294                  }                  }
295          }          }
296            
297          show_top10 = 0;          show_top10 = 0;
298          return REDRAW;          return REDRAW;
299  }  }
# Line 316  int locate_article(void *param) Line 322  int locate_article(void *param)
322    
323  int favor_topic(void *param)  int favor_topic(void *param)
324  {  {
325          clearscr();          if (article_favor_display(&BBS_article_favor) < 0)
326          prints("此功能尚未实现");          {
327          press_any_key();                  log_error("article_favor_display() error\n");
328            }
329    
330          return REDRAW;          return REDRAW;
331  }  }


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

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