35 |
35 |
36 class ArchDesc; |
36 class ArchDesc; |
37 |
37 |
38 //------------------------------FileBuff-------------------------------------- |
38 //------------------------------FileBuff-------------------------------------- |
39 // This class defines a nicely behaved buffer of text. Entire file of text |
39 // This class defines a nicely behaved buffer of text. Entire file of text |
40 // is read into buffer at creation, with sentinals at start and end. |
40 // is read into buffer at creation, with sentinels at start and end. |
41 class FileBuff { |
41 class FileBuff { |
42 friend class FileBuffRegion; |
42 friend class FileBuffRegion; |
43 private: |
43 private: |
44 long _bufferSize; // Size of text holding buffer. |
44 long _bufferSize; // Size of text holding buffer. |
45 long _offset; // Expected filepointer offset. |
45 long _offset; // Expected filepointer offset. |
46 long _bufoff; // Start of buffer file offset |
46 long _bufoff; // Start of buffer file offset |
47 |
47 |
48 char *_buf; // The buffer itself. |
48 char *_buf; // The buffer itself. |
49 char *_bigbuf; // The buffer plus sentinals; actual heap area |
49 char *_bigbuf; // The buffer plus sentinels; actual heap area |
50 char *_bufmax; // A pointer to the buffer end sentinal |
50 char *_bufmax; // A pointer to the buffer end sentinel |
51 char *_bufeol; // A pointer to the last complete line end |
51 char *_bufeol; // A pointer to the last complete line end |
52 |
52 |
53 int _err; // Error flag for file seek/read operations |
53 int _err; // Error flag for file seek/read operations |
54 long _filepos; // Current offset from start of file |
54 long _filepos; // Current offset from start of file |
55 int _linenum; |
55 int _linenum; |