diff --git a/BaseTools/Source/C/VfrCompile/Pccts/h/PBlackBox.h b/BaseTools/Source/C/VfrCompile/Pccts/h/PBlackBox.h index d25b8d69392c..149c27208184 100644 --- a/BaseTools/Source/C/VfrCompile/Pccts/h/PBlackBox.h +++ b/BaseTools/Source/C/VfrCompile/Pccts/h/PBlackBox.h @@ -33,9 +33,7 @@ #include "pcctscfg.h" -#include "pccts_iostream.h" - -PCCTS_NAMESPACE_STD +#include // MR20 Added #include for "DLexerBase.h" @@ -55,7 +53,7 @@ class DllExportPCCTS ParserBlackBox { // no copy assignment allowed ParserBlackBox & operator=(ParserBlackBox const &); - + protected: DLGFileInput *in; Lexer *scan; @@ -65,9 +63,9 @@ class DllExportPCCTS ParserBlackBox { FILE *file; int openByBlackBox; /* MR21 Don't close what we haven't opened */ public: - + ParserBlackBox(FILE *f) - : in(0) + : in(0) , scan(0) , tok(0) , pipe(0) @@ -77,7 +75,7 @@ class DllExportPCCTS ParserBlackBox { { if (f == NULL) { - cerr << "invalid file pointer\n"; + std::cerr << "invalid file pointer\n"; } else { @@ -101,10 +99,10 @@ class DllExportPCCTS ParserBlackBox { , file(0) , openByBlackBox(0) { - FILE *f = fopen(fname, "r"); + FILE *f = std::fopen(fname, "r"); if ( f==NULL ) { openByBlackBox = 0; - cerr << "cannot open " << fname << "\n"; return; + std::cerr << "cannot open " << fname << "\n"; return; } else { openByBlackBox = 1; @@ -118,12 +116,12 @@ class DllExportPCCTS ParserBlackBox { _parser->init(); } } - + ~ParserBlackBox() { delete in; delete scan; delete pipe; delete _parser; delete tok; if (1 == openByBlackBox) { - fclose(file); + std::fclose(file); } }