SBSPSS/Utils/Scripter/pfile.h

81 lines
1.5 KiB
C
Raw Normal View History

2000-12-11 21:54:12 +01:00
/*=========================================================================
pfile.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2000 Climax Development Ltd
===========================================================================*/
#ifndef __PFILE_H__
#define __PFILE_H__
/*----------------------------------------------------------------------
Includes
-------- */
/* Std Lib
------- */
2000-12-11 23:18:54 +01:00
#include <stdio.h>
2000-12-11 21:54:12 +01:00
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
2000-12-12 21:51:59 +01:00
class CPFile
{
public:
CPFile();
int open(char *_filename);
int close();
static class CPFile *getCurrentFile() {return s_stack;}
int readChar();
void error(FILE *_fh);
int getErrorCount() {return m_errorCount;}
private:
FILE *m_fh;
char *m_filename;
int m_charCount;
int m_lineCount;
int m_currentCharOnLine;
int m_errorCount;
class CPFile *m_next;
static class CPFile *s_stack;
};
2000-12-11 21:54:12 +01:00
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
2000-12-11 23:18:54 +01:00
extern int openPFile(char *_filename);
extern int closePFile();
2000-12-11 21:54:12 +01:00
/*---------------------------------------------------------------------- */
#endif /* __PFILE_H__ */
/*===========================================================================
end */