summaryrefslogtreecommitdiff
path: root/ace/IOStream_T.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-11 21:44:11 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-11 21:44:11 +0000
commitc33d8c4a3b20a6e349d89d700117e379729c5540 (patch)
treeac6e4e87f827dbd9a35fabc068b3fa2652c0239a /ace/IOStream_T.cpp
parent07fbd5b1eaa9e1b7b9290be0ca13fbedd8fa4a78 (diff)
downloadATCD-c33d8c4a3b20a6e349d89d700117e379729c5540.tar.gz
restored ACE_HAS_IOSTREAMH_INCLUSION protection around the ugliness that it involves
Diffstat (limited to 'ace/IOStream_T.cpp')
-rw-r--r--ace/IOStream_T.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/ace/IOStream_T.cpp b/ace/IOStream_T.cpp
index 53fbde66aff..81aea906eae 100644
--- a/ace/IOStream_T.cpp
+++ b/ace/IOStream_T.cpp
@@ -1,4 +1,3 @@
-// IOStream.cpp
// $Id$
#if !defined (ACE_IOSTREAM_T_C)
@@ -10,7 +9,7 @@
#if !defined (ACE_LACKS_ACE_IOSTREAM)
-#if defined (__GNUG__)
+#if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) && defined (__GNUG__)
# if !defined (ACE_IOSTREAM_T_H)
// _Only_ define this when compiling this .cpp file standalone, not
// when instantiating templates. Its purpose is to provide something
@@ -22,7 +21,7 @@
// declared in the iostream.h header file.
int ACE_IOStream_global_of_builtin_type_to_avoid_munch_problems = 0;
# endif /* ! ACE_IOSTREAM_T_H */
-#endif /* __GNUG__ */
+#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION && __GNUG__ */
#if !defined (__ACE_INLINE__)
#include "ace/IOStream_T.i"
@@ -34,8 +33,8 @@
template <class STREAM>
ACE_Streambuf_T<STREAM>::ACE_Streambuf_T (STREAM *peer,
- u_int streambuf_size,
- int io_mode)
+ u_int streambuf_size,
+ int io_mode)
: ACE_Streambuf (streambuf_size, io_mode),
peer_ (peer)
{
@@ -64,7 +63,7 @@ ACE_Streambuf_T<STREAM>::ACE_Streambuf_T (STREAM *peer,
template <class STREAM>
ACE_IOStream<STREAM>::ACE_IOStream (STREAM &stream,
- u_int streambuf_size)
+ u_int streambuf_size)
: iostream (streambuf_ = new ACE_Streambuf_T<STREAM> ((STREAM *) this, streambuf_size)),
STREAM (stream)
{
@@ -118,10 +117,10 @@ ACE_IOStream<STREAM>::operator>> (ACE_IOStream_String &v)
char c;
this->get (c);
- for (v = c;
+ for (v = c;
this->get (c) && !isspace (c);
v += c)
- continue;
+ continue;
}
isfx ();
@@ -139,7 +138,7 @@ ACE_IOStream<STREAM>::operator<< (ACE_IOStream_String &v)
#else
for (u_int i = 0; i < (u_int) v.length (); ++i)
#endif /* ACE_WIN32 */
- this->put (v[i]);
+ this->put (v[i]);
}
osfx ();
@@ -152,7 +151,7 @@ ACE_IOStream<STREAM>::operator<< (ACE_IOStream_String &v)
template <class STREAM> STREAM &
operator>> (STREAM &stream,
- ACE_Quoted_String &str)
+ ACE_Quoted_String &str)
{
char c;
@@ -160,7 +159,7 @@ operator>> (STREAM &stream,
// stream.set (ios::eofbit|ios::failbit);
return stream;
- str = ""; // Initialize the string
+ str = ""; // Initialize the string
// if we don't have a quote, append until we see space
if (c != '"')
@@ -169,25 +168,25 @@ operator>> (STREAM &stream,
else
for (; stream.get (c) && c != '"'; str += c)
if (c == '\\')
- {
- stream.get (c);
- if (c != '"')
- str += '\\';
- }
-
+ {
+ stream.get (c);
+ if (c != '"')
+ str += '\\';
+ }
+
return stream;
}
template <class STREAM> STREAM &
operator<< (STREAM &stream,
- ACE_Quoted_String &str)
+ ACE_Quoted_String &str)
{
stream.put ('"');
for (u_int i = 0; i < str.length (); ++i)
{
if (str[i] == '"')
- stream.put ('\\');
+ stream.put ('\\');
stream.put (str[i]);
}