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

Diff of /lbbs/src/section_list_display.c

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

Revision 1.68 by sysadm, Tue Nov 4 06:36:52 2025 UTC Revision 1.74 by sysadm, Mon Nov 10 14:24:37 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                                          section_list_display.c  -  description  /*
3                                                           -------------------   * section_list_display
4          Copyright            : (C) 2004-2025 by Leaflet   *   - user interactive feature of section articles list
5          Email                : leaflet@leafok.com   *
6   ***************************************************************************/   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7     */
 /***************************************************************************  
  *                                                                         *  
  *   This program is free software; you can redistribute it and/or modify  *  
  *   it under the terms of the GNU General Public License as published by  *  
  *   the Free Software Foundation; either version 3 of the License, or     *  
  *   (at your option) any later version.                                   *  
  *                                                                         *  
  ***************************************************************************/  
8    
9  #include "article_cache.h"  #include "article_cache.h"
10  #include "article_favor.h"  #include "article_favor.h"
# Line 39  Line 31 
31  #include <time.h>  #include <time.h>
32  #include <sys/param.h>  #include <sys/param.h>
33    
34  #define TITLE_SEARCH_MAX_LEN 60  enum _section_list_display_constant_t
35    {
36            TITLE_SEARCH_MAX_LEN = 60,
37    };
38    
39  static int32_t section_aid_locations[BBS_max_section] = {0};  static int32_t section_aid_locations[BBS_max_section] = {0};
40  static int section_topic_view_mode = 0;  static int section_topic_view_mode = 0;
# Line 226  static int section_list_draw_screen(cons Line 221  static int section_list_draw_screen(cons
221    
222          if (master_list[0] != '\0')          if (master_list[0] != '\0')
223          {          {
224                  snprintf(str_section_master, sizeof(str_section_master), "版主:%s", master_list);                  snprintf(str_section_master, sizeof(str_section_master), "版主: %s", master_list);
225          }          }
226          snprintf(str_section_name, sizeof(str_section_name), "讨论区 [%s]", sname);          snprintf(str_section_name, sizeof(str_section_name), "讨论区 [%s]", sname);
227    
# Line 279  static enum select_cmd_t section_list_se Line 274  static enum select_cmd_t section_list_se
274                          log_error("KEY_NULL\n");                          log_error("KEY_NULL\n");
275                          return EXIT_SECTION;                          return EXIT_SECTION;
276                  case KEY_TIMEOUT:                  case KEY_TIMEOUT:
277                          if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)                          if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
278                          {                          {
279                                  log_error("User input timeout\n");                                  log_error("User input timeout\n");
280                                  return EXIT_SECTION;                                  return EXIT_SECTION;
# Line 1181  int section_list_display(const char *sna Line 1176  int section_list_display(const char *sna
1176                          moveto(SCREEN_ROWS, 1);                          moveto(SCREEN_ROWS, 1);
1177                          clrtoeol();                          clrtoeol();
1178                          get_data(SCREEN_ROWS, 1,                          get_data(SCREEN_ROWS, 1,
1179                                           (direction == 1 ? "向下搜寻作者: " : "向上搜寻作者: "),                                           (direction == 1 ? "↓搜寻作者: " : "↑搜寻作者: "),
1180                                           username, sizeof(username), BBS_username_max_len);                                           username, sizeof(username), BBS_username_max_len);
1181    
1182                          if (username[0] == '\0')                          if (username[0] == '\0')
# Line 1270  int section_list_display(const char *sna Line 1265  int section_list_display(const char *sna
1265                          moveto(SCREEN_ROWS, 1);                          moveto(SCREEN_ROWS, 1);
1266                          clrtoeol();                          clrtoeol();
1267                          get_data(SCREEN_ROWS, 1,                          get_data(SCREEN_ROWS, 1,
1268                                           (direction == 1 ? "向下搜寻标题: " : "向上搜寻标题: "),                                           (direction == 1 ? "↓搜寻标题: " : "↑搜寻标题: "),
1269                                           title, sizeof(title), TITLE_SEARCH_MAX_LEN);                                           title, sizeof(title), TITLE_SEARCH_MAX_LEN);
1270    
1271                          if (title[0] == '\0')                          if (title[0] == '\0')
# Line 1406  int section_list_ex_dir_display(SECTION_ Line 1401  int section_list_ex_dir_display(SECTION_
1401                                  log_error("KEY_NULL\n");                                  log_error("KEY_NULL\n");
1402                                  return 0;                                  return 0;
1403                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
1404                                  if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
1405                                  {                                  {
1406                                          log_error("User input timeout\n");                                          log_error("User input timeout\n");
1407                                          return 0;                                          return 0;


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

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