* Sebastian Hammer, Adam Dickmeiss
*
* $Log: extract.c,v $
- * Revision 1.56 1996-05-09 09:54:42 adam
+ * Revision 1.57 1996-05-13 14:23:04 adam
+ * Work on compaction of set/use bytes in dictionary.
+ *
+ * Revision 1.56 1996/05/09 09:54:42 adam
* Server supports maps from one logical attributes to a list of physical
* attributes.
* The extraction process doesn't make space consuming 'any' keys.
#include <recctrl.h>
#include "index.h"
-#include "recindex.h"
+#include "zinfo.h"
static Dict matchDict;
static int records_deleted = 0;
static int records_processed = 0;
+static ZebTargetInfo *zti = NULL;
+
static void logRecord (int showFlag)
{
if (!showFlag)
}
assert (!records);
records = rec_open (1);
+#if 1
+ zti = zebTargetInfo_open (records, 1);
+#endif
}
struct encode_info {
{
key_flush ();
xfree (key_buf);
+#if 1
+ zebTargetInfo_close (zti, 1);
+#endif
rec_close (&records);
dict_close (matchDict);
char attrSet = -1;
short attrUse = -1;
int off = 0;
+
+#if 1
+ if (zebTargetInfo_curDatabase (zti, databaseName))
+ {
+ if (zebTargetInfo_newDatabase (zti, databaseName))
+ abort ();
+ }
+#endif
while (off < reckeys->buf_used)
{
const char *src = reckeys->buf + off;
key_flush ();
++ptr_i;
key_buf[ptr_top-ptr_i] = (char*)key_buf + key_buf_used;
+#if 1
+ lead = zebTargetInfo_lookupSU (zti, attrSet, attrUse);
+ if (lead < 0)
+ lead = zebTargetInfo_addSU (zti, attrSet, attrUse);
+ assert (lead > 0);
+ ((char*) key_buf) [key_buf_used++] = lead;
+#else
key_buf_used += index_word_prefix ((char*)key_buf + key_buf_used,
attrSet, attrUse, databaseName);
+#endif
while (*src)
((char*)key_buf) [key_buf_used++] = index_char_cvt (*src++);
src++;