Minor changes.
[egate.git] / include / fml.h
1 /*
2  * FML interpreter. Europagate, 1995
3  *
4  * fml.h,v
5  * Revision 1.2  1995/02/22  08:51:02  adam
6  * Output function can be customized.
7  *
8  * Revision 1.1  1995/02/20  21:15:46  adam
9  * Moved files to include.
10  *
11  * Revision 1.3  1995/02/10  15:50:55  adam
12  * MARC interface implemented. Minor bugs fixed. fmltest can
13  * be used to format single MARC records. New function '\list'
14  * implemented.
15  *
16  * Revision 1.2  1995/02/09  16:06:06  adam
17  * FML can be called from the outside multiple times by the functions:
18  * fml_exec_call and fml_exec_call_str.
19  * An interactive parameter (-i) to fmltest starts a shell-like
20  * interface to FML by using the fml_exec_call_str function.
21  *
22  * Revision 1.1.1.1  1995/02/06  13:48:10  adam
23  * First version of the FML interpreter. It's slow and memory isn't
24  * freed properly. In particular, the FML nodes aren't released yet.
25  *
26  */
27
28 #ifndef FML_H
29 #define FML_H
30 typedef struct Fml_record {
31     struct fml_node *list;
32     struct fml_sym_tab *sym_tab;
33
34     struct fml_atom *atom_free_list;
35     struct fml_node *node_free_list;
36
37     int escape_char;
38     int eof_mark;
39     char *white_chars;
40     char comment_char;
41     int (*read_func)(void);
42     void (*write_func)(int ch);
43     void (*err_handle)(int no);
44
45     int debug;
46 } *Fml;
47
48 Fml fml_open (void);
49 int fml_preprocess (Fml fml);
50
51 void fml_exec (Fml fml);
52 void fml_exec_call (Fml fml);
53 void fml_exec_call_str (Fml fml, const char *str);
54 void fml_exec_call_argv (Fml fml, const char **argv);
55
56 #define FML_ERR_NOMEM 1
57
58 #endif