X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=fml%2Ffmlmarc.c;h=8ed4382f19eb2485dbbd7690b523c21c48cfb0ce;hb=d79d0168774190148ff0927cea715996ad82bc62;hp=0db5ee39f5ae0cdfde43c246677dbb3cc80b3c01;hpb=372b7a22555387ae193ed303132342e654319420;p=egate.git diff --git a/fml/fmlmarc.c b/fml/fmlmarc.c index 0db5ee3..8ed4382 100644 --- a/fml/fmlmarc.c +++ b/fml/fmlmarc.c @@ -2,7 +2,11 @@ * FML interpreter. Europagate, 1995 * * $Log: fmlmarc.c,v $ - * Revision 1.1 1995/02/10 15:50:56 adam + * Revision 1.2 1995/02/10 16:52:08 adam + * Indicator field moved in MARC structure. The FML list representation + * of a MARC record has changed. + * + * Revision 1.1 1995/02/10 15:50:56 adam * MARC interface implemented. Minor bugs fixed. fmltest can * be used to format single MARC records. New function '\list' * implemented. @@ -18,6 +22,7 @@ #include "fmlp.h" +#if 0 struct fml_node *marc_to_fml (Fml fml, Iso2709Rec rec) { struct fml_node *ptr_0 = NULL, *ptr_1; @@ -53,7 +58,7 @@ struct fml_node *marc_to_fml (Fml fml, Iso2709Rec rec) } return ptr_0; } - +#endif static void add_string (const char *str, char **buf, int *max, int *size) { @@ -88,23 +93,21 @@ char *marc_to_str (Fml fml, Iso2709Rec rec) { struct iso2709_field *fields; - add_string ("{", &buf, &max, &size); + add_string ("{\'", &buf, &max, &size); add_string (dir->tag, &buf, &max, &size); + add_string ("\'",&buf, &max, &size); + if (dir->indicator) + { + add_string ("\'", &buf, &max, &size); + add_string (dir->indicator, &buf, &max, &size); + add_string ("\'", &buf, &max, &size); + } + else + add_string ("{}", &buf, &max, &size); add_string ("{", &buf, &max, &size); - for (fields = dir->fields; fields; fields=fields->next) { add_string ("{", &buf, &max, &size); - - if (fields->indicator) - { - add_string ("\'", &buf, &max, &size); - add_string (fields->indicator, &buf, &max, &size); - add_string ("\'", &buf, &max, &size); - } - else - add_string ("{}", &buf, &max, &size); - add_string (" ", &buf, &max, &size); if (fields->identifier) { add_string ("\'", &buf, &max, &size); @@ -113,11 +116,9 @@ char *marc_to_str (Fml fml, Iso2709Rec rec) } else add_string ("{}", &buf, &max, &size); - add_string (" ", &buf, &max, &size); - add_string ("\'", &buf, &max, &size); + add_string (" \'", &buf, &max, &size); add_string (fields->data, &buf, &max, &size); - add_string ("\'", &buf, &max, &size); - add_string ("}", &buf, &max, &size); + add_string ("\'}", &buf, &max, &size); } add_string ("}}\n", &buf, &max, &size); }