summaryrefslogtreecommitdiff
path: root/comm
diff options
context:
space:
mode:
Diffstat (limited to 'comm')
-rw-r--r--comm/MsgStream.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/comm/MsgStream.cc b/comm/MsgStream.cc
index ff552cf..e91860b 100644
--- a/comm/MsgStream.cc
+++ b/comm/MsgStream.cc
@@ -3,7 +3,7 @@
*
* by Michel Beaudouin-Lafon
*
- * Copyright 1990-1993
+ * Copyright 1990-1995
* Laboratoire de Recherche en Informatique (LRI)
*
* Message streams
@@ -163,46 +163,46 @@ UchBufStream :: WriteBuf (const byte* b, int n)
OutBuffer.WriteBuf (b, n);
}
-void
+bool
UchBufStream :: ReadLong (lword& l)
{
- InBuffer >> l;
+ return InBuffer.ReadLong (l);
}
-void
+bool
UchBufStream :: ReadShort (sword& s)
{
- InBuffer >> s;
+ return InBuffer.ReadShort (s);
}
-void
+bool
UchBufStream :: ReadByte (byte& b)
{
- InBuffer >> b;
+ return InBuffer.ReadByte (b);
}
-void
+bool
UchBufStream :: ReadChar (char& c)
{
- InBuffer >> c;
+ return InBuffer.ReadChar (c);
}
-void
-UchBufStream :: ReadString (char* s)
+int
+UchBufStream :: ReadString (char* s, int n)
{
- InBuffer >> s;
+ return InBuffer.ReadString (s, n);
}
-void
+int
UchBufStream :: ReadString (CcuString& s)
{
- InBuffer >> s;
+ return InBuffer.ReadString (s);
}
-void
+bool
UchBufStream :: ReadBuf (byte* b, int n)
{
- InBuffer.Get (b, n);
+ return InBuffer.ReadBuf (b, n);
}
@@ -349,7 +349,7 @@ UchMsgStream :: Process (UchMsgBuffer& buf, bool waitAnswer)
// fallthrough
case GOT_TYPE:
- if (! buf.Peek ((lword*) &InLength))
+ if (! buf.PeekLong ((lword&) InLength))
return 0;
buf.NeedSize ((int) InLength - buf.BufLength ());
State = GOT_LENGTH;