Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21069
Modified Files:
Tag: Release_0_9_5_stable
readris.c
Log Message:
wrap_citation(): now handles multi-head tex citations ok
Index: readris.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/readris.c,v
retrieving revision 1.12.2.4
retrieving revision 1.12.2.5
diff -u -U2 -r1.12.2.4 -r1.12.2.5
--- readris.c 28 Oct 2005 23:49:45 -0000 1.12.2.4
+++ readris.c 2 Jan 2006 22:14:18 -0000 1.12.2.5
@@ -337,5 +337,5 @@
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- wrap_citation(): wraps the citation ID into a comma-separated list
+ wrap_citation(): wraps the citation ID into a whitespace-separated list
static int wrap_citation returns 0 if ok, 1 if ID is malformed, 2 if a
@@ -378,4 +378,16 @@
}
+ /* in case of a multi-head citation, the tex citation element
+ contains a comma-separated list of IDs. Replacing the comma with
+ a space turns this into proper members of our
+ whitespace-separated list */
+ end = start; /* reuse end */
+ while (*end) {
+ if (*end == ',') {
+ *end = ' ';
+ }
+ end++;
+ }
+
if ((new_buffer = mstrcat(*ptr_buffer, start, ptr_bufsize, 0)) == NULL) {
fprintf(stderr, "out of memory\n");
|