Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.2 KiB

  1. #ifndef _PARSE_H_
  2. #define _PARSE_H_
  3. #ifdef __cplusplus
  4. #define CHAR_EOF -1
  5. class CParseFile
  6. {
  7. public:
  8. void Parse(FILE * pfileSrc, FILE * pfileDest, DWORD dwFlags);
  9. CParseFile();
  10. ~CParseFile() {};
  11. private:
  12. void _ParseInf(void);
  13. void _ParseHtml(void);
  14. void _ParseJS(void);
  15. void _ParseHtc(void);
  16. char _ReadChar(DWORD dwFlags);
  17. char _SniffChar(int ichAhead);
  18. BOOL _IsTagEqual(LPSTR pszTag);
  19. BOOL _IsEndTag(void);
  20. void _WriteChar(char);
  21. void _FlushWriteBuffer(void);
  22. void _WriteTag(void);
  23. void _SkipCommentTag(void);
  24. BOOL _SkipComment(int * pcNestedComment);
  25. BOOL _SkipWhitespace(BOOL bPreserveOneSpace = FALSE);
  26. void _ParseInnerStyle(void);
  27. FILE * _pfileSrc;
  28. FILE * _pfileDest;
  29. char _ch;
  30. int _ichRead;
  31. int _cchRead;
  32. int _ichWrite;
  33. BITBOOL _bSkipWhitespace: 1; // TRUE: skip whitespace
  34. BITBOOL _bFirstChar: 1; // TRUE: current character is first one on a new line
  35. char _szReadBuf[512];
  36. char _szWriteBuf[512];
  37. };
  38. #endif // __cplusplus
  39. #endif // _PARSE_H_