19 while ((c = getc(
_fp)) != EOF)
20 if (isprint(c) && !isspace(c))
47 while ((c = getc(
_fp)) != EOF)
66 while ((c = getc(
_fp)) != EOF)
80 if (parenLevel == 0 && buffSize > 0)
84 throw CException(
"EOF reached while reading list");
94 while ((c = getc(
_fp)) != EOF)
101 buffer[buffSize] = c;
108 if (parenLevel == 0 && buffSize > 0)
112 throw CException(
"EOF reached while reading list");
123 while ((c = getc(
_fp)) !=
'\n')
127 while (1 != fscanf(
_fp,
"End of Binary Section %6d",&
id));
138 if (fscanf(
_fp,
"%d", &
id) != 1)
140 cerr <<
"error reading id "<< endl;
173 while (1 != fscanf(
_fp,
"End of Binary Section %d",&
id));
176 cerr <<
"error closing binary section: expected " << currentId
177 <<
" , found " <<
id << endl;
186 if (fscanf(
_fp,
"%x%x%x%x",&i1,&i2,&i3,&i4) != 4)
188 cerr <<
"error reading header" << endl;
193 if (fscanf(
_fp,
"%x",&i5) != 1)
204 (1 != fread(&i,
sizeof(
int), 1,
_fp)) :
205 (1 != fscanf(
_fp,
"%x",&i)))
206 cerr <<
"Error reading int " << endl;
214 for (
int n=0; n<count; n++)
217 (1 != fread(&i,
sizeof(
int), 1,
_fp)) :
218 (1 != fscanf(
_fp,
"%x",&i)))
219 cerr <<
"Error reading int " << endl;
int readInt(const bool isBinary)
SchemeReader(const string &fileName)
void readHeader(int &i1, int &i2, int &i3, int &i4, int &i5)
void moveToListCloseBinary()
void skipInt(const int n, const bool isBinary)
int closeSectionBinary(const int currentId)
void readList(char *buffer)