X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=fml%2Ffml.c;h=4eabb9011cf2e7f573dd9754db447a8ece8f10f7;hb=380f18375a94274eeeca115d3a7eeec1cd035b8c;hp=d5f5af3769a51a061fc20f21990d3dc2b658d170;hpb=372b7a22555387ae193ed303132342e654319420;p=egate.git diff --git a/fml/fml.c b/fml/fml.c index d5f5af3..4eabb90 100644 --- a/fml/fml.c +++ b/fml/fml.c @@ -2,7 +2,17 @@ * FML interpreter. Europagate, 1995 * * $Log: fml.c,v $ - * Revision 1.7 1995/02/10 15:50:54 adam + * Revision 1.10 1995/02/21 17:46:08 adam + * Bug fix in fml_sub0. + * + * Revision 1.9 1995/02/21 14:00:03 adam + * Minor changes. + * + * Revision 1.8 1995/02/10 18:15:52 adam + * FML function 'strcmp' implemented. This function can be used to + * test for existence of MARC fields. + * + * Revision 1.7 1995/02/10 15:50:54 adam * MARC interface implemented. Minor bugs fixed. fmltest can * be used to format single MARC records. New function '\list' * implemented. @@ -126,6 +136,7 @@ Fml fml_open (void) fml_list_init (fml); fml_arit_init (fml); fml_rel_init (fml); + fml_str_init (fml); sym_info = fml_sym_add (fml->sym_tab, "s"); sym_info->kind = FML_CPREFIX; @@ -527,9 +538,13 @@ static struct fml_node *fml_sub0 (Fml fml, struct fml_node *list) if (!list) return NULL; fml_init_token (&token, fml); - assert (list); fml_cmd_lex (&list, &token); fn1 = fn = fml_sub1 (fml, &list, &token); + if (!fn) + { + fml_del_token (&token, fml); + return fn; + } if (fn->p[1] && token.kind != '\0') { fn1 = fml_node_alloc (fml);