char RawLD::getEntry(long away) const { uint32_t start = 0; uint16_t size = 0; char *idxbuf = 0; char retval = 0; char *buf = new char [ strlen(*key) + 6 ]; strcpy(buf, *key); if (strongsPadding) strongsPad(buf); if (!(retval = findOffset(buf, &start, &size, away))) { readText(start, &size, &idxbuf, entryBuf); rawFilter(entryBuf, 0); // hack, decipher rawFilter(entryBuf, key); entrySize = size; // support getEntrySize call if (!key->isPersist()) // If we have our own key *key = idxbuf; // reset it to entry index buffer stdstr(&entkeytxt, idxbuf); // set entry key text that module 'snapped' to. delete [] idxbuf; } else { entryBuf = ""; } delete [] buf; return retval; }
void RawLD::deleteEntry() { char *buf = new char [ strlen(*key) + 6 ]; strcpy(buf, *key); if (strongsPadding) strongsPad(buf); doSetText(buf, ""); delete [] buf; }
void RawLD::linkEntry(const SWKey *inkey) { char *buf = new char [ strlen(*key) + 6 ]; strcpy(buf, *key); if (strongsPadding) strongsPad(buf); doLinkEntry(buf, *inkey); delete [] buf; }
void RawLD::setEntry(const char *inbuf, long len) { char *buf = new char [ strlen(*key) + 6 ]; strcpy(buf, *key); if (strongsPadding) strongsPad(buf); doSetText(buf, inbuf, len); delete [] buf; }
long RawLD::getEntryForKey(const char *key) const { uint32_t start, offset; uint16_t size; char *buf = new char [ strlen(key) + 6 ]; strcpy(buf, key); if (strongsPadding) strongsPad(buf); findOffset(buf, &start, &size, 0, &offset); delete [] buf; return offset / IDXENTRYSIZE; }
long RawLD4::getEntryForKey(const char *key) const { __u32 start, offset; __u32 size; char *buf = new char [ strlen(key) + 6 ]; strcpy(buf, key); strongsPad(buf); findOffset(buf, &start, &size, 0, &offset); delete [] buf; return offset / IDXENTRYSIZE; }