summaryrefslogtreecommitdiffstats
path: root/private/crt32/iostream/strmbdbp.cxx
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/crt32/iostream/strmbdbp.cxx
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'private/crt32/iostream/strmbdbp.cxx')
-rw-r--r--private/crt32/iostream/strmbdbp.cxx48
1 files changed, 48 insertions, 0 deletions
diff --git a/private/crt32/iostream/strmbdbp.cxx b/private/crt32/iostream/strmbdbp.cxx
new file mode 100644
index 000000000..2f209a67f
--- /dev/null
+++ b/private/crt32/iostream/strmbdbp.cxx
@@ -0,0 +1,48 @@
+/***
+*strmbdbp.cxx - streambuf::dbp() debug routine
+*
+* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved.
+*
+*Purpose:
+* Dump debug info about streambuf to stdout.
+*
+*Revision History:
+*
+* 11-13-91 KRS Created.
+*
+*******************************************************************************/
+
+#include <cruntime.h>
+#include <internal.h>
+#include <io.h>
+#include <stdio.h>
+#include <iostream.h>
+#pragma hdrstop
+
+#pragma check_stack(on) // large buffer(s)
+
+void streambuf::dbp()
+{
+#if ((!defined(_WINDOWS)) || defined(_QWIN))
+int olen;
+_WINSTATIC char obuffer[256]; // CONSIDER: size? (198 bytes?)
+ if (unbuffered())
+ olen = sprintf(obuffer,
+ "\nSTREAMBUF DEBUG INFO: this=%p, unbuffered\n",
+ (void *) this);
+ else
+ {
+ olen = sprintf(obuffer,
+ "\nSTREAMBUF DEBUG INFO: this=%p, _fAlloc=%d\n"
+ " base()=%p, ebuf()=%p, blen()=%d\n"
+ " pbase()=%p, pptr()=%p, epptr()=%p\n"
+ " eback()=%p, gptr()=%p, egptr()=%p\n",
+ (void *) this, (_fAlloc),
+ base(), ebuf(), blen(),
+ pbase(), pptr(), epptr(),
+ eback(), gptr(), egptr());
+ }
+ _write(1,obuffer,olen); // direct write to stdout
+ // CONSIDER: add more info?
+#endif
+}