Author: sebor
Date: Fri May 5 12:41:58 2006
New Revision: 400154
URL: http://svn.apache.org/viewcvs?rev=400154&view=rev
Log:
2006-05-05 Martin Sebor <[EMAIL PROTECTED]>
* printf.cpp (_rw_vfprintf): Called OutputDebugString() to send
the string into the debugger window only when file is non-zero.
Modified:
incubator/stdcxx/trunk/tests/src/printf.cpp
Modified: incubator/stdcxx/trunk/tests/src/printf.cpp
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/src/printf.cpp?rev=400154&r1=400153&r2=400154&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/printf.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/printf.cpp Fri May 5 12:41:58 2006
@@ -3152,7 +3152,8 @@
// avoid formatting when there's nothing to output
if (file) {
- // allow null file argument
+ // allow null file argument (to determine
+ // the length of the formatted string)
// FIXME: implement this in terms of POSIX write()
// for async-signal safety
@@ -3164,20 +3165,21 @@
// it's determined not to refer to a terminal device,
// for example after it has been redirected to a file)
fflush (stdio_file);
- }
#ifdef _MSC_VER
- // IsDebuggerPresent() depends on the macros _WIN32_WINNT and WINVER
- // being appropriately #defined prior to the #inclusion of <windows.h>
- if (IsDebuggerPresent ()) {
-
- // write string to the attached debugger (if any)
- OutputDebugString (buf);
- }
+ // IsDebuggerPresent() depends on the macros _WIN32_WINNT
+ // and WINVER being appropriately #defined prior to the
+ // #inclusion of <windows.h>
+ if (IsDebuggerPresent ()) {
+
+ // write string to the attached debugger (if any)
+ OutputDebugString (buf);
+ }
#endif // _MSC_VER
+ }
}
free (buf);