/[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.28 by sysadm, Sat May 3 13:41:21 2025 UTC Revision 1.29 by sysadm, Sun May 4 01:44:00 2025 UTC
# Line 253  int display_file_ex(const char *filename Line 253  int display_file_ex(const char *filename
253    
254          while (loop)          while (loop)
255          {          {
256                  if (c_line_current >= c_line_total)                  if (c_line_current >= c_line_total && c_line_total <= screen_rows - 2)
257                  {                  {
258                          if (wait)                          if (wait)
259                          {                          {
# Line 268  int display_file_ex(const char *filename Line 268  int display_file_ex(const char *filename
268                          break;                          break;
269                  }                  }
270    
271                  if (line >= max_lines)                  if (c_line_current >= c_line_total || line >= max_lines)
272                  {                  {
273                          if (c_line_current - (line - 1) + (screen_rows - 2) < c_line_total)                          if (c_line_current - (line - 1) + (screen_rows - 2) < c_line_total)
274                          {                          {
# Line 276  int display_file_ex(const char *filename Line 276  int display_file_ex(const char *filename
276                          }                          }
277                          else                          else
278                          {                          {
                                 log_error("P100 reached\n");  
279                                  percentile = 100;                                  percentile = 100;
280                          }                          }
281    
282                          moveto(screen_rows, 0);                          moveto(screen_rows, 0);
283                          prints("\033[1;44;32m下面还有喔 (%d%%)\033[33m   │ 结束 ← <q> │ ↑/↓/PgUp/PgDn 移动 │ ? 辅助说明 │     \033[m",                          prints("\033[1;44;32m%s (%d%%)%s\033[33m  │ 结束 ← <q> │ ↑/↓/PgUp/PgDn 移动 │ ? 辅助说明 │     \033[m",
284                                     percentile);                                     (percentile < 100 ? "下面还有喔" : "没有更多了"), percentile,
285                                       (percentile < 10 ? "  " : (percentile < 100 ? " " : "")));
286                          iflush();                          iflush();
287    
288                          input_ok = 0;                          input_ok = 0;
# Line 301  int display_file_ex(const char *filename Line 301  int display_file_ex(const char *filename
301                                          line = begin_line;                                          line = begin_line;
302                                          max_lines = begin_line + 1;                                          max_lines = begin_line + 1;
303                                          prints("\033[T"); // Scroll down 1 line                                          prints("\033[T"); // Scroll down 1 line
304                                          //max_lines = screen_rows - 1; // Legacy Fterm only works with this line                                          // max_lines = screen_rows - 1; // Legacy Fterm only works with this line
305                                          break;                                          break;
306                                  case KEY_DOWN:                                  case KEY_DOWN:
307                                  case CR:                                  case CR:


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

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