+ISAMS_M key_isams_m (Res res)
+{
+ static ISAMS_M me = NULL;
+
+ if (me)
+ return me;
+
+ me = isams_getmethod ();
+
+ me->compare_item = key_compare;
+
+ me->code_start = iscz1_code_start;
+ me->code_item = iscz1_code_item;
+ me->code_stop = iscz1_code_stop;
+
+ me->debug = atoi(res_get_def (res, "isamsDebug", "0"));
+
+ return me;
+}
+
+
+int key_SU_code (int ch, char *out)
+{
+ int i;
+ for (i = 0; ch; i++)
+ {
+ if (ch > 63)
+ out[i] = 128 + (ch & 63);
+ else
+ out[i] = 1 + ch;
+ ch = ch >> 6;
+ }
+ return i;
+}