diff options
Diffstat (limited to 'include/rawstr4.h')
-rw-r--r-- | include/rawstr4.h | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/include/rawstr4.h b/include/rawstr4.h index 8a552b3..b67c375 100644 --- a/include/rawstr4.h +++ b/include/rawstr4.h @@ -4,7 +4,7 @@ * and provides lookup and parsing functions based on * class StrKey * - * $Id: rawstr4.h,v 1.4 2002/03/13 06:55:39 scribe Exp $ + * $Id: rawstr4.h,v 1.9 2003/02/27 07:39:37 scribe Exp $ * * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -26,31 +26,33 @@ #define RAWSTR4_H #include <filemgr.h> - +#include <swbuf.h> #include <defs.h> -class SWDLLEXPORT RawStr4 -{ - static int instance; // number of instantiated RawStr4 objects or derivitives - char *path; - long lastoff; +SWORD_NAMESPACE_START + +class SWDLLEXPORT RawStr4 { + static int instance; // number of instantiated RawStr4 objects or derivitives + char *path; + long lastoff; protected: - FileDesc *idxfd; - FileDesc *datfd; - void preptext (char *buf); - void settext (const char *key, const char *buf, long len = 0); - void linkentry (const char *destkey, const char *srckey); + FileDesc *idxfd; + FileDesc *datfd; + void prepText(SWBuf &buf); + void doSetText(const char *key, const char *buf, long len = -1); + void doLinkEntry(const char *destkey, const char *srckey); public: - char nl; - RawStr4(const char *ipath, int fileMode = -1); - virtual ~ RawStr4(); - void getidxbuf (long ioffset, char **buf); - void getidxbufdat (long ioffset, char **buf); - signed char findoffset (const char *key, long *start, unsigned long *size, - long away = 0, long *idxoff = 0); - void gettext (long start, unsigned long size, char *idxbuf, char *buf); - static signed char createModule (const char *path); + char nl; + RawStr4(const char *ipath, int fileMode = -1); + virtual ~RawStr4(); + void getIDXBuf(long ioffset, char **buf); + void getIDXBufDat(long ioffset, char **buf); + signed char findOffset(const char *key, long *start, unsigned long *size, + long away = 0, long *idxoff = 0); + void readText(long start, unsigned long *size, char **idxbuf, SWBuf &buf); + static signed char createModule(const char *path); }; +SWORD_NAMESPACE_END #endif |