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

Diff of /lbbs/src/screen.c

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

Revision 1.64 by sysadm, Mon May 19 01:44:49 2025 UTC Revision 1.68 by sysadm, Tue May 20 08:24:28 2025 UTC
# Line 293  int display_file_ex(const char *filename Line 293  int display_file_ex(const char *filename
293                                  input_ok = 1;                                  input_ok = 1;
294                                  switch (ch)                                  switch (ch)
295                                  {                                  {
296                                  // case KEY_NULL:                                  case KEY_NULL:
297                                  case KEY_TIMEOUT:                                  case KEY_TIMEOUT:
298                                          goto cleanup;                                          goto cleanup;
299                                  case KEY_HOME:                                  case KEY_HOME:
# Line 440  int show_top(const char *status) Line 440  int show_top(const char *status)
440                  status_f[len] = '\0';                  status_f[len] = '\0';
441          }          }
442    
443          len = split_line(BBS_current_section_name, 20, &truncate, &section_name_len);          len = split_line(BBS_current_section_name, BBS_section_name_max_len, &truncate, &section_name_len);
444          if (truncate)          if (truncate)
445          {          {
446                  log_error("Section name is truncated\n");                  log_error("Section name is truncated\n");
# Line 485  int show_bottom(const char *msg) Line 485  int show_bottom(const char *msg)
485          moveto(SCREEN_ROWS, 0);          moveto(SCREEN_ROWS, 0);
486          clrtoeol();          clrtoeol();
487          prints("\033[1;44;33m[\033[36m%s\033[33m]%*s%*sÕʺÅ[\033[36m%s\033[33m]"          prints("\033[1;44;33m[\033[36m%s\033[33m]%*s%*sÕʺÅ[\033[36m%s\033[33m]"
488                     "[\033[36m%1d\033[33m:\033[36m%2d\033[33m:\033[36m%2d\033[33m]\033[m",                     "[\033[36m%1d\033[33mÌì\033[36m%2d\033[33mʱ\033[36m%2d\033[33m·Ö]\033[m",
489                     str_time, 21, msg_f, 13 - len_username, "", BBS_username,                     str_time, 21, msg_f, 9 - len_username, "", BBS_username,
490                     tm_online->tm_mday - 1, tm_online->tm_hour, tm_online->tm_min);                     tm_online->tm_mday - 1, tm_online->tm_hour, tm_online->tm_min);
491    
492          return 0;          return 0;
# Line 501  int show_active_board() Line 501  int show_active_board()
501          static const void *p_data;          static const void *p_data;
502          static const long *p_line_offsets;          static const long *p_line_offsets;
503    
504            static time_t t_last_show = 0;
505            static int line_last = 0;
506    
507          char buffer[LINE_BUFFER_LEN];          char buffer[LINE_BUFFER_LEN];
508          long int len;          long int len;
509    
# Line 513  int show_active_board() Line 516  int show_active_board()
516                  }                  }
517          }          }
518    
519            if (time(0) - t_last_show >= 10)
520            {
521                    line_last = line_current;
522                    t_last_show = time(0);
523            }
524            else
525            {
526                    line_current = line_last;
527            }
528    
529          clrline(2, 2 + ACTIVE_BOARD_HEIGHT);          clrline(2, 2 + ACTIVE_BOARD_HEIGHT);
530    
531          for (int i = 0; i < ACTIVE_BOARD_HEIGHT; i++)          for (int i = 0; i < ACTIVE_BOARD_HEIGHT; i++)


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

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