/[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.75 by sysadm, Tue Nov 11 00:28:05 2025 UTC Revision 1.78 by sysadm, Sun Nov 23 04:28:24 2025 UTC
# Line 712  int section_list_display(const char *sna Line 712  int section_list_display(const char *sna
712                  {                  {
713                  case EXIT_SECTION:                  case EXIT_SECTION:
714                          // Update current aid location                          // Update current aid location
715                          if (p_articles[selected_index] != NULL)                          if (selected_index < article_count && p_articles[selected_index] != NULL)
716                          {                          {
717                                  if (selected_index >= ontop_start_offset)                                  if (selected_index >= ontop_start_offset)
718                                  {                                  {
# Line 1191  int section_list_display(const char *sna Line 1191  int section_list_display(const char *sna
1191                          // Verify format                          // Verify format
1192                          for (i = 0, ok = 1; ok && username[i] != '\0'; i++)                          for (i = 0, ok = 1; ok && username[i] != '\0'; i++)
1193                          {                          {
1194                                  if (!(isalpha(username[i]) || (i > 0 && (isdigit(username[i]) || username[i] == '_'))))                                  if (!(isalpha((int)username[i]) || (i > 0 && (isdigit((int)username[i]) || username[i] == '_'))))
1195                                  {                                  {
1196                                          ok = 0;                                          ok = 0;
1197                                  }                                  }
# Line 1357  int section_list_ex_dir_display(SECTION_ Line 1357  int section_list_ex_dir_display(SECTION_
1357  {  {
1358          MENU_SET ex_menu_set;          MENU_SET ex_menu_set;
1359          int ch = 0;          int ch = 0;
1360            int loop;
1361    
1362          if (p_section == NULL)          if (p_section == NULL)
1363          {          {
# Line 1389  int section_list_ex_dir_display(SECTION_ Line 1390  int section_list_ex_dir_display(SECTION_
1390    
1391          if (display_menu(&ex_menu_set) == 0)          if (display_menu(&ex_menu_set) == 0)
1392          {          {
1393                  while (!SYS_server_exit)                  for (loop = 1; !SYS_server_exit && loop;)
1394                  {                  {
1395                          iflush();                          iflush();
1396                          ch = igetch(100);                          ch = igetch(100);
# Line 1403  int section_list_ex_dir_display(SECTION_ Line 1404  int section_list_ex_dir_display(SECTION_
1404                          {                          {
1405                          case KEY_NULL: // broken pipe                          case KEY_NULL: // broken pipe
1406                                  log_error("KEY_NULL\n");                                  log_error("KEY_NULL\n");
1407                                  return 0;                                  loop = 0;
1408                                    break;
1409                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
1410                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
1411                                  {                                  {
1412                                          log_error("User input timeout\n");                                          log_error("User input timeout\n");
1413                                          return 0;                                          loop = 0;
1414                                            break;
1415                                  }                                  }
1416                                  continue;                                  continue;
1417                          case CR:                          case CR:
# Line 1416  int section_list_ex_dir_display(SECTION_ Line 1419  int section_list_ex_dir_display(SECTION_
1419                                  switch (menu_control(&ex_menu_set, ch))                                  switch (menu_control(&ex_menu_set, ch))
1420                                  {                                  {
1421                                  case EXITMENU:                                  case EXITMENU:
1422                                          ch = EXITMENU;                                          loop = 0;
1423                                          break;                                          break;
1424                                  case REDRAW:                                  case REDRAW:
1425                                          clearscr();                                          clearscr();
# Line 1429  int section_list_ex_dir_display(SECTION_ Line 1432  int section_list_ex_dir_display(SECTION_
1432                                          break;                                          break;
1433                                  }                                  }
1434                          }                          }
   
                         if (ch == EXITMENU)  
                         {  
                                 break;  
                         }  
1435                  }                  }
1436          }          }
1437    


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

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