* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: d1_grs.c,v 1.25 2002-08-23 14:27:18 adam Exp $
+ * $Id: d1_grs.c,v 1.26 2002-10-08 22:18:22 adam Exp $
*
*/
*len += 4;
break;
case DATA1I_text:
+ case DATA1I_xmltext:
res->which = Z_ElementData_string;
res->u.string = (char *)odr_malloc(o, toget+1);
if (toget)
static int is_empty_data (data1_node *n)
{
- if (n && n->which == DATA1N_data && n->u.data.what == DATA1I_text)
+ if (n && n->which == DATA1N_data && (n->u.data.what == DATA1I_text
+ || n->u.data.what == DATA1I_xmltext))
{
int i = n->u.data.len;
- while (i > 0 && n->u.data.data[i-1] == '\n')
+ while (i > 0 && strchr("\n ", n->u.data.data[i-1]))
i--;
if (i == 0)
return 1;
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: d1_sutrs.c,v 1.7 2002-05-03 13:48:27 adam Exp $
+ * $Id: d1_sutrs.c,v 1.8 2002-10-08 22:18:23 adam Exp $
*
*/
int l = c->u.data.len;
int first = 0;
- if (c->u.data.what == DATA1I_text && c->u.data.formatted_text)
+ if ((c->u.data.what == DATA1I_text ||
+ c->u.data.what == DATA1I_xmltext) && c->u.data.formatted_text)
{
wrbuf_putc(b, '\n');
wrbuf_write(b, c->u.data.data, c->u.data.len);
wrbuf_write(b, line, strlen(line));
col = indent * NTOBUF_INDENT;
}
- else if (c->u.data.what == DATA1I_text)
+ else if (c->u.data.what == DATA1I_text ||
+ c->u.data.what == DATA1I_xmltext)
{
while (l)
{