diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/crt32/iostream/ostrchar.cxx | |
download | NT4.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/ostrchar.cxx')
-rw-r--r-- | private/crt32/iostream/ostrchar.cxx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/private/crt32/iostream/ostrchar.cxx b/private/crt32/iostream/ostrchar.cxx new file mode 100644 index 000000000..3e8bb07a2 --- /dev/null +++ b/private/crt32/iostream/ostrchar.cxx @@ -0,0 +1,39 @@ +/*** +* ostrchar.cxx - definitions for ostream class operator<<(char) functions. +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the member function definitions for ostream operator<<(char). +* +*Revision History: +* 09-23-91 KRS Created. Split out from ostream.cxx for granularity. +* +*******************************************************************************/ + +#include <cruntime.h> +#include <internal.h> +#include <iostream.h> +#pragma hdrstop + +// note: called inline by char and signed char versions: +ostream& ostream::operator<<(unsigned char c) +{ + if (opfx()) + { + if (x_width) + { + _WINSTATIC char outc[2]; + outc[0] = c; + outc[1] = '\0'; + writepad("",outc); + } + else if (bp->sputc(c)==EOF) + { + if (bp->overflow(c)==EOF) + state |= (badbit|failbit); // fatal error? + } + osfx(); + } + return *this; +} |