-/* $Id: zrpn.c,v 1.151 2004-09-13 09:02:16 adam Exp $
+/* $Id: zrpn.c,v 1.152 2004-09-14 14:38:07 quinn Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
static const char **rpn_char_map_handler (void *vp, const char **from, int len)
{
struct rpn_char_map_info *p = (struct rpn_char_map_info *) vp;
- const char **out = zebra_maps_input (p->zm, p->reg_type, from, len);
+ const char **out = zebra_maps_input (p->zm, p->reg_type, from, len, 0);
#if 0
if (out && *out)
{
}
static int term_pre (ZebraMaps zebra_maps, int reg_type, const char **src,
- const char *ct1, const char *ct2)
+ const char *ct1, const char *ct2, int first)
{
const char *s1, *s0 = *src;
const char **map;
if (ct2 && strchr (ct2, *s0))
break;
s1 = s0;
- map = zebra_maps_input (zebra_maps, reg_type, &s1, strlen(s1));
+ map = zebra_maps_input (zebra_maps, reg_type, &s1, strlen(s1), first);
if (**map != *CHR_SPACE)
break;
s0 = s1;
const char *space_start = 0;
const char *space_end = 0;
- if (!term_pre (zebra_maps, reg_type, src, NULL, NULL))
+ if (!term_pre (zebra_maps, reg_type, src, NULL, NULL, !space_split))
return 0;
s0 = *src;
while (*s0)
{
s1 = s0;
- map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0));
+ map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0), 0);
if (space_split)
{
if (**map == *CHR_SPACE)
int i = 0;
int j = 0;
- if (!term_pre (zebra_maps, reg_type, src, "#", "#"))
+ if (!term_pre (zebra_maps, reg_type, src, "#", "#", !space_split))
return 0;
s0 = *src;
while (*s0)
else
{
s1 = s0;
- map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0));
+ map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0), 0);
if (space_split && **map == *CHR_SPACE)
break;
while (s1 < s0)
const char *s0, *s1;
const char **map;
- if (!term_pre (zebra_maps, reg_type, src, "^\\()[].*+?|", "("))
+ if (!term_pre (zebra_maps, reg_type, src, "^\\()[].*+?|", "(", !space_split))
return 0;
s0 = *src;
if (errors && *s0 == '+' && s0[1] && s0[2] == '+' && s0[3] &&
else
{
s1 = s0;
- map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0));
+ map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0), 0);
if (**map == *CHR_SPACE)
break;
while (s1 < s0)
int i = 0;
int j = 0;
- if (!term_pre (zebra_maps, reg_type, src, "?*#", "?*#"))
+ if (!term_pre (zebra_maps, reg_type, src, "?*#", "?*#", !space_split))
return 0;
s0 = *src;
while (*s0)
}
{
s1 = s0;
- map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0));
+ map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0), 0);
if (space_split && **map == *CHR_SPACE)
break;
while (s1 < s0)
int i = 0;
int j = 0;
- if (!term_pre (zebra_maps, reg_type, src, "*!", "*!"))
+ if (!term_pre (zebra_maps, reg_type, src, "*!", "*!", !space_split))
return 0;
s0 = *src;
while (*s0)
}
{
s1 = s0;
- map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0));
+ map = zebra_maps_input (zebra_maps, reg_type, &s0, strlen(s0), 0);
if (space_split && **map == *CHR_SPACE)
break;
while (s1 < s0)
while ((len = (cp_end - cp)) > 0)
{
- map = zebra_maps_input (zh->reg->zebra_maps, reg_type, &cp, len);
+ map = zebra_maps_input (zh->reg->zebra_maps, reg_type, &cp, len, 0);
if (**map == *CHR_SPACE)
space_map = *map;
else