Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
in re .1 I attach a small testprogram, which uses vswprintf(). It seems that vswprintf() doesn't deliver anything into its buffer. Is something wrong with my program or have we found a bug in vswprintf() ? The output of the testprogram: deccc35:orao35> uname -a OSF1 deccc35 V4.0 564 alpha deccc35:orao35> tn direct: Hello, hello via vsprintf: Hello, hello direct: H e l l o, h e l l o via vswprintf: deccc35:orao35> Anything known ? Eckhardt
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
9432.1 | SAPEC3::WALLMEROTH | Tue Apr 08 1997 14:53 | 42 | ||
#include <stdarg.h> #include <wchar.h> void MyPrintf( const char *format, ...) { va_list ap; char buf[512]; va_start( ap, format ); vprintf( " direct: " ); vprintf( format, ap ); va_end( ap ); va_start( ap, format ); vsprintf( buf, format, ap ); printf( "via vsprintf: %s", buf ); va_end( ap ); } void MyWprintf( const wchar_t *format, ...) { va_list ap; wchar_t buf[512]; va_start( ap, format ); vwprintf( L" direct: " ); vwprintf( format, ap ); va_end( ap ); va_start( ap, format ); vswprintf( buf, 128, format, ap ); wprintf( L"via vswprintf: %S", buf ); va_end( ap ); } main( int argc, char** argv ) { MyPrintf( "%s%s\n", "Hello, ", "hello" ); MyWprintf( L"%S%S\n", L"H e l l o, ", L"h e l l o" ); exit( 0 ); } | |||||
9432.2 | NETRIX::"[email protected]" | Bob Fontaine | Thu Apr 10 1997 12:22 | 13 | |
Your code is fine but you have uncovered a bug in the vswprintf() routine. Please file a Software Problem Report (SPR). Bob [Posted by WWW Notes gateway] | |||||
9432.3 | QAR #52446 | SAPEC3::WALLMEROTH | Fri Apr 11 1997 05:21 | 1 | |
Is a QAR also acceptable ? |