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