-/* $Id: zebraapi.c,v 1.260 2007-10-29 09:25:41 adam Exp $
+/* $Id: zebraapi.c,v 1.262 2007-10-31 16:56:14 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
return zebra_end_trans (zh);
}
-int zebra_string_norm(ZebraHandle zh, unsigned reg_id,
+int zebra_string_norm(ZebraHandle zh, const char *index_type,
const char *input_str, int input_len,
char *output_str, int output_len)
{
WRBUF wrbuf;
+ zebra_map_t zm = zebra_map_get(zh->reg->zebra_maps, index_type);
ASSERTZH;
assert(input_str);
assert(output_str);
if (!zh->reg->zebra_maps)
return -1;
- wrbuf = zebra_replace(zh->reg->zebra_maps, reg_id, "",
- input_str, input_len);
+ wrbuf = zebra_replace(zm, "", input_str, input_len);
if (!wrbuf)
return -2;
if (wrbuf_len(wrbuf) >= output_len)