2 * FML interpreter. Europagate, 1995
5 * Revision 1.1 1995/02/10 18:15:53 adam
6 * FML function 'strcmp' implemented. This function can be used to
7 * test for existence of MARC fields.
17 static struct fml_node *fml_exec_strcmp (Fml fml, struct fml_node **lp,
21 struct fml_node *fn = NULL, *fn1, *fn2;
26 fn1 = fml_expr_term (fml, lp, tp);
27 fn2 = fml_expr_term (fml, lp, tp);
28 if (!fn1->is_atom && !fn2->is_atom)
30 n = fml_atom_cmp (fml, fn1->p[0], fn2->p[0]);
37 fn = fml_node_alloc (fml);
39 fn->p[0] = fml_atom_alloc (fml, arg);
43 void fml_str_init (Fml fml)
45 struct fml_sym_info *sym_info;
47 sym_info = fml_sym_add (fml->sym_tab, "strcmp");
48 sym_info->kind = FML_CPREFIX;
49 sym_info->prefix = fml_exec_strcmp;