/[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.33 by sysadm, Mon May 5 11:11:06 2025 UTC Revision 1.35 by sysadm, Tue May 6 05:12:29 2025 UTC
# Line 202  int get_data(int row, int col, char *pro Line 202  int get_data(int row, int col, char *pro
202  {  {
203          int len;          int len;
204    
205            igetch(1); // Cleanup input buffer
206    
207          moveto(row, col);          moveto(row, col);
208          prints(prompt);          prints(prompt);
209          prints(buffer);          prints(buffer);
# Line 216  int display_file(const char *filename) Line 218  int display_file(const char *filename)
218  {  {
219          char buffer[LINE_BUFFER_LEN];          char buffer[LINE_BUFFER_LEN];
220          FILE *fin;          FILE *fin;
221          int i;          size_t i;
222    
223          if ((fin = fopen(filename, "r")) == NULL)          if ((fin = fopen(filename, "r")) == NULL)
224          {          {
# Line 245  int display_file_ex(const char *filename Line 247  int display_file_ex(const char *filename
247          char buffer[LINE_BUFFER_LEN];          char buffer[LINE_BUFFER_LEN];
248          int ch = 0;          int ch = 0;
249          int input_ok, line, max_lines;          int input_ok, line, max_lines;
250          long int c_line_current = 0, c_line_total = 0;          long int c_line_current = 0;
251            long int c_line_total = 0;
252          FILE *fin;          FILE *fin;
253          long *p_line_offsets;          long *p_line_offsets;
254          int len;          long int len;
255          int percentile;          long int percentile;
256          int loop = 1;          int loop = 1;
257    
258          if ((fin = fopen(filename, "r")) == NULL)          if ((fin = fopen(filename, "r")) == NULL)
# Line 398  int display_file_ex(const char *filename Line 401  int display_file_ex(const char *filename
401                          log_error("Error length exceeds buffer size: %d\n", len);                          log_error("Error length exceeds buffer size: %d\n", len);
402                          len = LINE_BUFFER_LEN - 1;                          len = LINE_BUFFER_LEN - 1;
403                  }                  }
404                  if (fgets(buffer, len + 1, fin) == NULL)                  if (fgets(buffer, (int)len + 1, fin) == NULL)
405                  {                  {
406                          log_error("Reach EOF\n");                          log_error("Reach EOF\n");
407                          break;                          break;
# Line 420  int show_top(char *status) Line 423  int show_top(char *status)
423  {  {
424          char buffer[LINE_BUFFER_LEN];          char buffer[LINE_BUFFER_LEN];
425    
426          str_space(buffer, 20 - strnlen(BBS_current_section_name, sizeof(BBS_current_section_name)));          str_space(buffer, 20 - (int)strnlen(BBS_current_section_name, sizeof(BBS_current_section_name)));
427    
428          moveto(1, 0);          moveto(1, 0);
429          clrtoeol();          clrtoeol();
# Line 440  int show_bottom(char *msg) Line 443  int show_bottom(char *msg)
443          struct tm *tm_online;          struct tm *tm_online;
444    
445          get_time_str(str_time, sizeof(str_time));          get_time_str(str_time, sizeof(str_time));
446          str_space(buffer, 33 - strnlen(BBS_username, sizeof(BBS_username)));          str_space(buffer, 33 - (int)strnlen(BBS_username, sizeof(BBS_username)));
447    
448          time_online = time(0) - BBS_login_tm;          time_online = time(0) - BBS_login_tm;
449          tm_online = gmtime(&time_online);          tm_online = gmtime(&time_online);
# Line 463  int show_active_board() Line 466  int show_active_board()
466          char buffer[LINE_BUFFER_LEN];          char buffer[LINE_BUFFER_LEN];
467          FILE *fin;          FILE *fin;
468          static int line;          static int line;
469          int len;          unsigned int len;
470          int end_of_line;          int end_of_line;
471    
472          clrline(3, 2 + ACTIVE_BOARD_HEIGHT);          clrline(3, 2 + ACTIVE_BOARD_HEIGHT);


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

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