//****************************************************************************** // ReadParse.h // Copyright 1999 by Gottfried Rudorfer // // E-Mail: Gottfried.Rudorfer@ai.wu-wien.ac.at // // All rights reserved. //****************************************************************************** // Documentation: *************************************************************** // VARIABLES: // in .... map of key/value pairs //****************************************************************************** #include #include #include #include #include using namespace std; extern "C" { #include #include #include #include #include } // characters that we accept (according to CERT) const char _ok_chars[] = "abcdefghijklmnopqrstuvwxyz\ ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-+.@%=&"; typedef map StringStringMap; void CgiNoSpace(); class ReadParse { public: ReadParse(); ~ReadParse(); void PrintHeader(); string EvalString(const string); string EvalFile(const string); void Mygetenv(char*); StringStringMap in; int strnicmp(const char *s1, const char *s2, const int count); int HexToChar(char *strptr, char &thechar); private: void Parse(); char *_html_string; int _has_parsed; string Line(const string& text, const string::size_type pos); char *_env_string; char *CertFix(char*); };