This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
diag - fix return length on %p
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos patches <ecos-patches at ecos dot sourceware dot org>
- Date: Wed, 30 Jun 2004 10:43:42 -0600
- Subject: diag - fix return length on %p
- Organization: MLB Associates
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: infra/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/infra/current/ChangeLog,v
retrieving revision 1.45
diff -u -5 -p -r1.45 ChangeLog
--- infra/current/ChangeLog 16 Apr 2004 03:33:05 -0000 1.45
+++ infra/current/ChangeLog 30 Jun 2004 16:42:22 -0000
@@ -1,5 +1,9 @@
+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>
* tests/cxxsupp.cxx: Allow inline function to be correctly inlined.
2004-04-15 Jonathan Larmour <jifl@eCosCentric.com>
Index: infra/current/src/diag.cxx
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/infra/current/src/diag.cxx,v
retrieving revision 1.15
diff -u -5 -p -r1.15 diag.cxx
--- infra/current/src/diag.cxx 8 Jan 2004 12:27:38 -0000 1.15
+++ infra/current/src/diag.cxx 30 Jun 2004 16:41:59 -0000
@@ -7,11 +7,11 @@
//========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-// Copyright (C) 2002 Gary Thomas
+// Copyright (C) 2002, 2004 Gary Thomas
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
@@ -390,10 +390,11 @@ _vprintf(void (*putc)(char c, void **par
case 'p': // Pointer
(*putc)('0', param);
(*putc)('x', param);
zero_fill = true;
left_prec = sizeof(unsigned long)*2;
+ res += 2; // Account for "0x" leadin
case 'd':
case 'D':
case 'u':
case 'U':
case 'x':