2009-04-17 12:02:50 +00:00
|
|
|
/* file manager class - read lines of files [filename] OR [filename.hz] */
|
|
|
|
#ifndef _FILEMGR_HXX_
|
|
|
|
#define _FILEMGR_HXX_
|
2011-07-19 18:27:47 +00:00
|
|
|
|
|
|
|
#include "hunvisapi.h"
|
|
|
|
|
2009-04-17 12:02:50 +00:00
|
|
|
#include "hunzip.hxx"
|
2011-07-19 18:27:47 +00:00
|
|
|
#include <stdio.h>
|
2009-04-17 12:02:50 +00:00
|
|
|
|
2011-07-19 18:27:47 +00:00
|
|
|
class LIBHUNSPELL_DLL_EXPORTED FileMgr
|
2009-04-17 12:02:50 +00:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
FILE * fin;
|
|
|
|
Hunzip * hin;
|
|
|
|
char in[BUFSIZE + 50]; // input buffer
|
|
|
|
int fail(const char * err, const char * par);
|
|
|
|
int linenum;
|
|
|
|
|
|
|
|
public:
|
|
|
|
FileMgr(const char * filename, const char * key = NULL);
|
|
|
|
~FileMgr();
|
|
|
|
char * getline();
|
|
|
|
int getlinenum();
|
|
|
|
};
|
|
|
|
#endif
|