+ if (marc_compare (identifier, argv[6])==0)
+ {
+ char *data = xmalloc (i-i0+1);
+
+ memcpy (data, buf+i0, i-i0);
+ data[i-i0] = '\0';
+ if (mode == 'l')
+ {
+ if (strcmp (tag, ptag))
+ {
+ if (*ptag)
+ Tcl_AppendResult (interp, "}} ", NULL);
+ if (!*indicator)
+ Tcl_AppendResult (interp, "{", tag, " {} {", NULL);
+ else
+ Tcl_AppendResult (interp, "{", tag, " {",
+ indicator, "} {", NULL);
+ strcpy (ptag, tag);
+ }
+ if (!*identifier)
+ Tcl_AppendResult (interp, "{{}", NULL);
+ else
+ Tcl_AppendResult (interp, "{", identifier, NULL);
+ Tcl_AppendElement (interp, data);
+ Tcl_AppendResult (interp, "} ", NULL);
+ }
+ else if (mode == 'g')
+ {
+ if (strcmp (tag, ptag))
+ {
+ if (*ptag)
+ Tcl_AppendResult (interp, "}} ", NULL);
+ if (*indicator)
+ Tcl_AppendResult (interp, "{ 0 numeric {", tag,
+ indicator, "} subtree {", NULL);
+ else
+ Tcl_AppendResult (interp, "{ 0 numeric ", tag,
+ " subtree {", NULL);
+ strcpy (ptag, tag);
+ }
+ if (*identifier)
+ Tcl_AppendResult (interp, "{3 string ", identifier,
+ " string ", NULL);
+ else
+ Tcl_AppendResult (interp, "{1 numeric 19 string ",
+ NULL);
+ Tcl_AppendElement (interp, data);
+ Tcl_AppendResult (interp, "} ", NULL);
+ }
+ else
+ Tcl_AppendElement (interp, data);
+ xfree (data);
+ }