> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com]
> Sent: Friday, November 03, 2006 1:40 AM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r466955 -
> /incubator/stdcxx/trunk/tests/src/printf.cpp
>
> faridz@apache.org wrote:
> > Author: faridz
> > Date: Mon Oct 23 01:57:26 2006
> > New Revision: 466955
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=466955
> > Log:
> > 2006-10-23 Farid Zaripov <faridz@kyiv.vdiweb.com>
> >
> > * printf.cpp (_rw_fmtstrarray): Use ' ' as delimiter if
> > ' ' is specified in flags field
>
> This new feature should be exercised in the self/0.printf.cpp test.
I have added new format ("%{P}") for print rw_pid_t. Also I have
modified 0.printf.cpp test to exercise "%{P}" and %{ As} formatting
directives. The diff files are attached.
We have a problem with "%{M}" formatting directive. In rwtest library
the memptr_t type is defined within fmt_defs.h as a pointer to member
function of incomplete type with size sizeof(memptr_t) == 16 on MSVC.
The 0.printf.cpp test exercising the "%{M}" directive with memptr_t
defined as pointer to member function of complete type with size
sizeof(memptr_t) == 4 on MSVC.
Does the "%{M}" formatting directive is intended for printing the any
pointer to member of any class or only void (Class::*)() where Class
is the simple class? Because the size of pointer to class member can
vary depending from the class I think we should pass the sizeof of the
pointer too.
ChangeLog:
* printf.cpp (rw_vasnprintf): Added checking for malformed directive
(_rw_fmttm, _rw_fmtarray, _rw_fmtstrarray, _rw_fmtstr, _rw_fmtwstr):
Third parameter of __rw::__rw_memattr() changed to -1
(_rw_vasnprintf_ext): Ditto. Added "%{P}" formating directive to
format the rw_pid_t value
* 0.printf.cpp: #included rw_process.h for rw_pid_t
(test_chararray): Added missing backslash in result string
(test_stringarray): Added exercising of the "%{ As}" formatting
directive
(test_pid): New function exercising the "%{P}" formating directive
(main): Added call to the test_pid()
Farid.
|