From a796833043d0ff3e4a6db7e444bc3b4546c8d390 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 23 Jul 2004 22:13:48 +0000 Subject: - Remove unneeded RtfContext structure --- src/rtfparser.h | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'src/rtfparser.h') diff --git a/src/rtfparser.h b/src/rtfparser.h index e1636fc..9509a35 100644 --- a/src/rtfparser.h +++ b/src/rtfparser.h @@ -86,26 +86,20 @@ protected: StackInt m_uniEatStack; int m_uniEat; -private: - - // TODO: Why aren't these just members? + FILE* m_file; // The file we're currently parsing + wstring m_dataBuffer; // The block of data we're caching to send - struct RtfContext - { - FILE* file; // The current file being parsed - wstring data; // Any data stored up ready to be sent to handler - bool isData; // TODO: Do we need this? - }; +private: // Parse helpers - bool parseControlWord(RtfContext& cx); - bool parseHexChar(RtfContext& cx, int num); + bool parseControlWord(); + bool parseHexChar(int num); // Convenience functions for calling the handler - void sendControlWord(RtfContext& cx, string cw, int flags, int param); - void sendData(RtfContext& cx, wchar_t ch); - void sendData(RtfContext& cx, wstring data); - void flushData(RtfContext& cx); + void sendControlWord(string cw, int flags, int param); + void sendData(wchar_t ch); + void sendData(wstring data); + void flushData(); }; /* -- cgit v1.2.3