/[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.55 by sysadm, Sat May 17 05:56:17 2025 UTC Revision 1.56 by sysadm, Sat May 17 06:14:22 2025 UTC
# Line 438  int show_top(char *status) Line 438  int show_top(char *status)
438          int status_len;          int status_len;
439          int section_name_len;          int section_name_len;
440          int len;          int len;
441            char status_f[21];
442    
443          len = split_line(status, 20, &truncate, &status_len);          strncpy(status_f, status, sizeof(status_f) - 1);
444            status_f[sizeof(status_f) - 1] = '\0';
445    
446            len = split_line(status_f, 20, &truncate, &status_len);
447          if (truncate)          if (truncate)
448          {          {
449                  status[len] = '\0';                  log_error("Status string is truncated\n");
450                    status_f[len] = '\0';
451          }          }
452    
453          len = split_line(BBS_current_section_name, 20, &truncate, &section_name_len);          len = split_line(BBS_current_section_name, 20, &truncate, &section_name_len);
454          if (truncate)          if (truncate)
455          {          {
456                  status[len] = '\0';                  log_error("Section name is truncated\n");
457          }          }
458    
459          moveto(1, 0);          moveto(1, 0);
460          clrtoeol();          clrtoeol();
461          prints("\033[1;44;33m%s \033[37m%*s%*s\033[33m ÌÖÂÛÇø [%s]\033[m",          prints("\033[1;44;33m%s \033[37m%*s%*s\033[33m ÌÖÂÛÇø [%s]\033[m",
462                     status, (39 - status_len), BBS_name, (30 - section_name_len), "", BBS_current_section_name);                     status_f, (39 - status_len), BBS_name, (30 - section_name_len), "", BBS_current_section_name);
463          iflush();          iflush();
464    
465          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