summaryrefslogtreecommitdiff
path: root/comm/OLD/TextStream.cc
diff options
context:
space:
mode:
authorchatty1995-02-13 16:55:31 +0000
committerchatty1995-02-13 16:55:31 +0000
commit5b5dea3e38bccca25e5efd315186869b9918aa7d (patch)
tree52b38255e9ba8b659eb475fdf4af652c93f247c0 /comm/OLD/TextStream.cc
parentfc323560826ac24b7a66b5cd0a5621963b9d1677 (diff)
downloadivy-league-5b5dea3e38bccca25e5efd315186869b9918aa7d.zip
ivy-league-5b5dea3e38bccca25e5efd315186869b9918aa7d.tar.gz
ivy-league-5b5dea3e38bccca25e5efd315186869b9918aa7d.tar.bz2
ivy-league-5b5dea3e38bccca25e5efd315186869b9918aa7d.tar.xz
Receive -> Read*
Emit -> Write*
Diffstat (limited to 'comm/OLD/TextStream.cc')
-rw-r--r--comm/OLD/TextStream.cc61
1 files changed, 35 insertions, 26 deletions
diff --git a/comm/OLD/TextStream.cc b/comm/OLD/TextStream.cc
index 445add6..790a03e 100644
--- a/comm/OLD/TextStream.cc
+++ b/comm/OLD/TextStream.cc
@@ -248,78 +248,87 @@ UchTextStream :: Quit ()
void
-UchTextStream :: Emit (lword l)
+UchTextStream :: WriteLong (lword l)
{
- char c [1];
+ char c [64];
sprintf (c, "%d", l);
OutBuffer << c;
}
void
-UchTextStream :: Emit (sword s)
+UchTextStream :: WriteShort (sword s)
{
- char c [1];
+ char c [64];
sprintf (c, "%d", s);
OutBuffer << c;
}
void
-UchTextStream :: Emit (byte b)
+UchTextStream :: WriteByte (byte b)
{
- char c [1];
+ char c [8];
sprintf (c, "%d", b);
OutBuffer << c;
}
void
-UchTextStream :: Emit (char c)
+UchTextStream :: WriteChar (char c)
{
OutBuffer << c;
}
void
-UchTextStream :: Emit (const char* s)
+UchTextStream :: WriteString (const char* s)
{
OutBuffer << s;
}
-void
-UchTextStream :: Receive (lword& l)
+bool
+UchTextStream :: ReadLong (lword& l)
{
- InBuffer >> l;
+ char c [64];
+ InBuffer.ReadString (c, 64);
+ l = (lword) atol (c);
+ return true;
}
-void
-UchTextStream :: Receive (sword& s)
+bool
+UchTextStream :: ReadShort (sword& s)
{
- InBuffer >> s;
+ char c [64];
+ InBuffer.ReadString (c, 64);
+ s = (sword) atoi (c);
+ return true;
}
-void
-UchTextStream :: Receive (byte& b)
+bool
+UchTextStream :: ReadByte (byte& b)
{
- InBuffer >> b;
+ char c [8];
+ InBuffer.ReadString (c, 8);
+ b = (byte) atoi (c);
+ return true;
}
-void
-UchTextStream :: Receive (char& c)
+bool
+UchTextStream :: ReadChar (char& c)
{
- InBuffer >> c;
+ return InBuffer.ReadChar (c);
}
-void
-UchTextStream :: Receive (char* s)
+int
+UchTextStream :: ReadString (char* s, int n)
{
- InBuffer >> s;
+ return InBuffer.ReadString (s, n);
}
-void
-UchTextStream :: Receive (CcuString& s)
+int
+UchTextStream :: ReadString (CcuString& s)
{
- InBuffer >> s;
+ return InBuffer.ReadString (s);
}