From ebdb943e94ee1594357a7cbb0c18e386c5f821eb Mon Sep 17 00:00:00 2001 From: chatty Date: Wed, 8 Feb 1995 14:42:53 +0000 Subject: Finally got rid of hyperloaded function UchMsgBuffer::Get --- comm/MsgStream.cc | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'comm') 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; -- cgit v1.1