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

Diff of /lbbs/src/bbs_net.c

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

Revision 1.107 by sysadm, Sat Dec 20 08:32:21 2025 UTC Revision 1.108 by sysadm, Sat Dec 20 10:46:42 2025 UTC
# Line 209  static void progress_bar(int percent, in Line 209  static void progress_bar(int percent, in
209  {  {
210          char line[LINE_BUFFER_LEN];          char line[LINE_BUFFER_LEN];
211          char buf[LINE_BUFFER_LEN];          char buf[LINE_BUFFER_LEN];
         char buf2[LINE_BUFFER_LEN];  
212          int pos;          int pos;
213    
214          if (len < 4)          if (len < 4)
# Line 241  static void progress_bar(int percent, in Line 240  static void progress_bar(int percent, in
240    
241          snprintf(buf, sizeof(buf), "%*s%3d%%%*s",          snprintf(buf, sizeof(buf), "%*s%3d%%%*s",
242                           (len - 4) / 2, "", percent, (len - 4 + 1) / 2, "");                           (len - 4) / 2, "", percent, (len - 4 + 1) / 2, "");
         memcpy(buf2, buf, (size_t)pos);  
         buf2[pos] = '\0';  
243    
244          moveto(4, 1);          moveto(4, 1);
245          prints("%s\r\n", line);          prints("%s\r\n", line);
246          prints("|\033[46m%s\033[44m%s\033[m|\r\n", buf2, buf + pos);          prints("|\033[46m%.*s\033[44m%s\033[m|\r\n", pos, buf, buf + pos);
247          prints("%s\r\n", line);          prints("%s\r\n", line);
248          iflush();          iflush();
249  }  }


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

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