384 char errorStatus =
findOffset(ikey, &start, &size, 0, &idxoff);
388 len = (len < 0) ? strlen(buf) : len;
392 if (strcmp(key, dbKey) < 0) {
394 else if (strcmp(key, dbKey) > 0) {
395 if (errorStatus != (
char)-2)
399 else if ((!strcmp(key, dbKey)) && (len>0 )) {
401 tmpbuf =
new char [ size + 2 ];
402 memset(tmpbuf, 0, size + 2);
406 for (ch = tmpbuf; *ch; ch++) {
412 memmove(tmpbuf, ch, size - (
unsigned short)(ch-tmpbuf));
415 if (!strncmp(tmpbuf,
"@LINK", 5) && (len)) {
416 for (ch = tmpbuf; *ch; ch++) {
422 findOffset(tmpbuf + 6, &start, &size, 0, &idxoff);
431 shiftSize = endoff - idxoff;
434 idxBytes =
new char [ shiftSize ];
439 outbuf =
new char [ len + strlen(key) + 5 ];
440 sprintf(outbuf,
"%s%c%c", key, 13, 10);
441 size = strlen(outbuf);
442 memcpy(outbuf + size, buf, len);
443 size = outsize = size + (len);
long seek(long offset, int whence)
long write(const void *buf, long count)
signed char trunc(FileDesc *file)
char * toupperstr_utf8(char *t, unsigned int max=0)
SWORD_NAMESPACE_START char * stdstr(char **ipstr, const char *istr, unsigned int memPadFactor=1)
long read(void *buf, long count)
void getIDXBufDat(long ioffset, char **buf) const
signed char findOffset(const char *key, SW_u32 *start, SW_u16 *size, long away=0, SW_u32 *idxoff=0) const
static FileMgr * getSystemFileMgr()