-#if _FILE_OFFSET_BITS == 64
-#define PRINTF_OFF_T "%Ld"
-#else
-#define PRINTF_OFF_T "%ld"
-#endif
+#define ENCODE_BUFLEN 768
+struct encode_info {
+ void *encode_handle;
+ void *decode_handle;
+ char buf[ENCODE_BUFLEN];
+};
+
+static int log_level = 0;
+static int log_level_initialized = 1;
+
+static void zebra_init_log_level()
+{
+ if (!log_level_initialized)
+ {
+ log_level = yaz_log_module_level("extract");
+ log_level_initialized = 1;
+ }
+}
+
+static void extract_flushRecordKeys (ZebraHandle zh, SYSNO sysno,
+ int cmd, zebra_rec_keys_t reckeys,
+ zint staticrank);
+static void extract_flushSortKeys (ZebraHandle zh, SYSNO sysno,
+ int cmd, zebra_rec_keys_t skp);
+static void extract_schema_add (struct recExtractCtrl *p, Odr_oid *oid);
+static void extract_token_add (RecWord *p);
+
+static void encode_key_init (struct encode_info *i);
+static void encode_key_write (char *k, struct encode_info *i, FILE *outf);
+static void encode_key_flush (struct encode_info *i, FILE *outf);