summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/VfrCompile/Pccts/h/BufFileInput.cpp
diff options
context:
space:
mode:
authorGuo Mang <mang.guo@intel.com>2018-04-25 17:24:58 +0800
committerGuo Mang <mang.guo@intel.com>2018-04-25 17:26:11 +0800
commit6e3789d7424660b14ef3d7123221c97db5d8aff5 (patch)
tree6a5a7f1e0bc5a5296f2de0c8f02091c85e3443b7 /BaseTools/Source/C/VfrCompile/Pccts/h/BufFileInput.cpp
parentd33896d88d9d32d516129e92e25b80f8fddc6f7b (diff)
downloadedk2-platforms-6e3789d7424660b14ef3d7123221c97db5d8aff5.tar.xz
Remove unused files
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'BaseTools/Source/C/VfrCompile/Pccts/h/BufFileInput.cpp')
-rw-r--r--BaseTools/Source/C/VfrCompile/Pccts/h/BufFileInput.cpp100
1 files changed, 0 insertions, 100 deletions
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/h/BufFileInput.cpp b/BaseTools/Source/C/VfrCompile/Pccts/h/BufFileInput.cpp
deleted file mode 100644
index 99d08a42a4..0000000000
--- a/BaseTools/Source/C/VfrCompile/Pccts/h/BufFileInput.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-// FILE: BufFileInput.cpp
-// AUTHOR: Alexey Demakov (AVD) demakov@kazbek.ispras.ru
-// CREATION: 26-JAN-1998
-// DESCRIPTION: File Input Stream with lookahead for Scanner.
-// See file BufFileInput.h for details
-
-// Change History:
-//
-// 22-Jun-1998 assert.h -> PCCTS_ASSERT_H
-// string.h -> PCCTS_STRING_H
-//
-// 28-May-1998 Add virtual destructor to release buffer.
-//
-// Add dummy definition for ANTLRTokenType
-// to allow compilation without knowing
-// token type codes.
-//
-// Manfred Kogler (km@cast.uni-linz.ac.at)
-// (1.33MR14)
-//
-// 20-Jul-1998 MR14a - Reorder initialization list for ctor.
-//
-
-enum ANTLRTokenType {TER_HATES_CPP=0, SO_DO_OTHERS=9999 };
-
-#include "pcctscfg.h"
-#include "pccts_assert.h"
-#include "pccts_string.h"
-
-PCCTS_NAMESPACE_STD
-
-#include "BufFileInput.h"
-
-BufFileInput::BufFileInput( FILE *f, int buf_size )
-: input( f ),
- buf( new int[buf_size] ),
- size( buf_size ),
- start( 0 ),
- len( 0 )
-{
-}
-
-BufFileInput::~BufFileInput()
-{
- delete [] buf;
-}
-
-int BufFileInput::nextChar( void )
-{
- if( len > 0 )
- {
- // get char from buffer
- int c = buf[start];
-
- if( c != EOF )
- {
- start++; start %= size;
- len--;
- }
- return c;
- } else {
- // get char from file
- int c = getc( input );
-
- if( c == EOF )
- {
- // if EOF - put it in the buffer as indicator
- buf[start] = EOF;
- len++;
- }
- return c;
- }
-}
-
-int BufFileInput::lookahead( char* s )
-{
- int l = strlen( s );
-
- assert( 0 < l && l <= size );
-
- while( len < l )
- {
- int c = getc( input );
-
- buf[ (start+len) % size ] = c;
-
- len++;
-
- if( c == EOF ) return 0;
- }
-
- for( int i = 0; i < l; i++ )
- {
- if( s[i] != buf[ (start+i) % size ] ) return 0;
- }
- return 1;
-}
-
-// End of file BufFileInput.cpp
-