2 * FML interpreter. Europagate, 1995
5 * Revision 1.3 1995/02/23 08:32:06 adam
8 * Revision 1.1 1995/02/10 18:15:53 adam
9 * FML function 'strcmp' implemented. This function can be used to
10 * test for existence of MARC fields.
20 static struct fml_node *fml_exec_strcmp (Fml fml, struct fml_node **lp,
24 struct fml_node *fn = NULL, *fn1, *fn2;
29 fn1 = fml_expr_term (fml, lp, tp);
30 fn2 = fml_expr_term (fml, lp, tp);
31 if (!fn1->is_atom && !fn2->is_atom)
33 n = fml_atom_cmp (fml, fn1->p[0], fn2->p[0]);
40 fn = fml_node_alloc (fml);
42 fn->p[0] = fml_atom_alloc (fml, arg);
46 void fml_str_init (Fml fml)
48 struct fml_sym_info *sym_info;
50 sym_info = fml_sym_add (fml->sym_tab, "strcmp");
51 sym_info->kind = FML_CPREFIX;
52 sym_info->prefix = fml_exec_strcmp;