From d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47 Mon Sep 17 00:00:00 2001 From: weidai Date: Tue, 12 Jul 2005 04:23:32 +0000 Subject: port to MSVC .NET 2005 beta 2 git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@198 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- ida.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'ida.h') diff --git a/ida.h b/ida.h index ba4cbd7..8ebb4ec 100644 --- a/ida.h +++ b/ida.h @@ -18,11 +18,11 @@ public: unsigned int GetThreshold() const {return m_threshold;} void AddOutputChannel(word32 channelId); - void ChannelData(word32 channelId, const byte *inString, unsigned int length, bool messageEnd); - unsigned int InputBuffered(word32 channelId) const; + void ChannelData(word32 channelId, const byte *inString, size_t length, bool messageEnd); + lword InputBuffered(word32 channelId) const; void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); - unsigned int ChannelPut2(const std::string &channel, const byte *begin, unsigned int length, int messageEnd, bool blocking) + size_t ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking) { if (!blocking) throw BlockingInputOnly("RawIDA"); @@ -40,8 +40,9 @@ protected: void PrepareInterpolation(); void ProcessInputQueues(); - std::map m_inputChannelMap; - std::map::iterator m_lastMapPosition; + typedef std::map InputChannelMap; + InputChannelMap m_inputChannelMap; + InputChannelMap::iterator m_lastMapPosition; std::vector m_inputQueues; std::vector m_inputChannelIds, m_outputChannelIds, m_outputToInput; std::vector m_outputChannelIdStrings; @@ -64,7 +65,7 @@ public: } void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); - unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking); + size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking); bool Flush(bool hardFlush, int propagation=-1, bool blocking=true) {return m_ida.Flush(hardFlush, propagation, blocking);} protected: @@ -102,7 +103,7 @@ public: } void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); - unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking); + size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking); bool Flush(bool hardFlush, int propagation=-1, bool blocking=true) {return m_ida.Flush(hardFlush, propagation, blocking);} protected: @@ -136,14 +137,14 @@ public: : m_possiblePadding(false) {Detach(attachment);} void IsolatedInitialize(const NameValuePairs ¶meters) {m_possiblePadding = false;} - unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking); + size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking); // GetPossiblePadding() == false at the end of a message indicates incorrect padding bool GetPossiblePadding() const {return m_possiblePadding;} private: bool m_possiblePadding; - unsigned long m_zeroCount; + lword m_zeroCount; }; NAMESPACE_END -- cgit v1.2.1