projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb36df3
)
Quotes and slashes may occur within attributes.
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 27 Mar 2001 23:06:21 +0000
(23:06 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 27 Mar 2001 23:06:21 +0000
(23:06 +0000)
retrieval/d1_read.c
patch
|
blob
|
history
diff --git
a/retrieval/d1_read.c
b/retrieval/d1_read.c
index
78b7cdd
..
0af7492
100644
(file)
--- a/
retrieval/d1_read.c
+++ b/
retrieval/d1_read.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_read.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_read.c,v $
- * Revision 1.37 2001-02-28 09:00:06 adam
+ * Revision 1.38 2001-03-27 23:06:21 adam
+ * Quotes and slashes may occur within attributes.
+ *
+ * Revision 1.37 2001/02/28 09:00:06 adam
* Fixed problem with stack overflow for very nested records.
*
* Revision 1.36 2001/02/21 13:46:53 adam
* Fixed problem with stack overflow for very nested records.
*
* Revision 1.36 2001/02/21 13:46:53 adam
@@
-373,19
+376,30
@@
data1_xattr *data1_read_xattr (data1_handle dh, NMEM m,
{
c = (*get_byte)(fh);
if (c == '"')
{
c = (*get_byte)(fh);
if (c == '"')
- c = (*get_byte)(fh);
- wrbuf_rewind(wrbuf);
- while (c && c != '"' && c != '>' && c != '/')
{
{
- wrbuf_putc (wrbuf, c);
- c = (*get_byte)(fh);
+ c = (*get_byte)(fh);
+ wrbuf_rewind(wrbuf);
+ while (c && c != '"')
+ {
+ wrbuf_putc (wrbuf, c);
+ c = (*get_byte)(fh);
+ }
+ if (c)
+ c = (*get_byte)(fh);
}
}
+ else
+ {
+ wrbuf_rewind(wrbuf);
+ while (c && c != '>' && c != '/')
+ {
+ wrbuf_putc (wrbuf, c);
+ c = (*get_byte)(fh);
+ }
+ }
wrbuf_putc (wrbuf, '\0');
len = wrbuf_len(wrbuf);
p->value = (char*) nmem_malloc (m, len);
strcpy (p->value, wrbuf_buf(wrbuf));
wrbuf_putc (wrbuf, '\0');
len = wrbuf_len(wrbuf);
p->value = (char*) nmem_malloc (m, len);
strcpy (p->value, wrbuf_buf(wrbuf));
- if (c == '"')
- c = (*get_byte)(fh);
}
}
*ch = c;
}
}
*ch = c;