This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

diag_printf - returned length was incorrect


-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: infra/current/ChangeLog
===================================================================
RCS file: /home/gthomas/my_cvs/develop/ecos/packages/infra/current/ChangeLog,v
retrieving revision 1.10.6.1
diff -u -5 -p -r1.10.6.1 ChangeLog
--- infra/current/ChangeLog	30 Jun 2004 20:55:13 -0000	1.10.6.1
+++ infra/current/ChangeLog	12 Jul 2004 22:01:30 -0000
@@ -1,5 +1,9 @@
+2004-07-12  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/diag.cxx (_vprintf): Fix return length for %%
+
 2004-06-30  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/diag.cxx (_vprintf): Returned [length] was wrong for %p
 
 2004-04-16  Jonathan Larmour  <jifl@eCosCentric.com>
Index: infra/current/src/diag.cxx
===================================================================
RCS file: /home/gthomas/my_cvs/develop/ecos/packages/infra/current/src/diag.cxx,v
retrieving revision 1.3.16.1
diff -u -5 -p -r1.3.16.1 diag.cxx
--- infra/current/src/diag.cxx	30 Jun 2004 20:55:13 -0000	1.3.16.1
+++ infra/current/src/diag.cxx	12 Jul 2004 21:53:00 -0000
@@ -451,15 +451,17 @@ _vprintf(void (*putc)(char c, void **par
                 }
                 cp = buf;
                 break;
             case '%':
                 (*putc)('%', param);
-                break;
+                res++;
+                continue;
             default:
                 (*putc)('%', param);
                 (*putc)(c, param);
                 res += 2;
+                continue;
             }
             pad = left_prec - length;
             if (sign != '\0') {
                 pad--;
             }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]