Rev 5520 | Rev 13310 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5520 | bpr | 1 | /* wims_mathml 1.4.9 |
2 | * wims_mathml.h last modified 10/27/2011 |
||
3 | */ |
||
4 | |||
5 | #ifndef ITEX2MML_H |
||
6 | #define ITEX2MML_H |
||
7 | |||
8 | #define ITEX2MML_VERSION "1.4.9" |
||
9 | |||
10 | #ifdef __cplusplus |
||
11 | extern "C" { |
||
12 | #endif |
||
13 | |||
14 | /* Step 1. Parse a buffer with itex source; return value is mathml, or 0 on failure (e.g., parse error). |
||
15 | */ |
||
16 | const int set_javascript();// wims_mathml.y can read this variable |
||
17 | const char * read_fontsize(); // wims_mathml.y may use this from wims_mathml.cc to read string "fontsize" |
||
18 | const char * read_mathml_id(); // wims_mathml.y may use this from wims_mathml.cc to read string "mathml_id" |
||
19 | extern char * wims_mathml_parse (const char * buffer, unsigned long length); |
||
20 | |||
21 | /* Step 2. Free the string from Step 1. |
||
22 | */ |
||
23 | extern void wims_mathml_free_string (char * str); |
||
24 | |||
25 | |||
26 | /* Alternatively, to filter generic source and converting embedded equations, use: |
||
27 | */ |
||
28 | extern int wims_mathml_filter (const char * buffer, unsigned long length); |
||
29 | extern int wims_mathml_html_filter (const char * buffer, unsigned long length); |
||
30 | extern int wims_mathml_strict_html_filter (const char * buffer, unsigned long length); |
||
7396 | schaersvoo | 31 | extern int wims_mathml_do_html_filter (const char * buffer, unsigned long length, const int forbid_markup); |
5520 | bpr | 32 | |
33 | |||
34 | /* To change output methods: |
||
35 | * |
||
36 | * Note: If length is 0, then buffer is treated like a string; otherwise only length bytes are written. |
||
37 | */ |
||
38 | extern void (*wims_mathml_write) (const char * buffer, unsigned long length); /* default writes to stdout */ |
||
39 | extern void (*wims_mathml_write_mathml) (const char * mathml); /* default calls wims_mathml_write(mathml,0) */ |
||
40 | extern void (*wims_mathml_error) (const char * msg); /* default writes to stderr */ |
||
41 | |||
42 | |||
43 | /* Other stuff: |
||
44 | */ |
||
45 | extern void wims_mathml_setup (const char * buffer, unsigned long length); |
||
46 | |||
47 | extern void wims_mathml_restart (); |
||
48 | |||
49 | extern char * wims_mathml_copy_string (const char * str); |
||
50 | extern char * wims_mathml_copy_string_extra (const char * str, unsigned extra); |
||
51 | extern char * wims_mathml_copy2 (const char * first, const char * second); |
||
52 | extern char * wims_mathml_copy3 (const char * first, const char * second, const char * third); |
||
53 | extern char * wims_mathml_copy_escaped (const char * str); |
||
54 | |||
55 | extern char * wims_mathml_empty_string; |
||
56 | |||
57 | extern int wims_mathml_lineno; |
||
58 | |||
59 | extern int wims_mathml_rowposn; |
||
60 | extern int wims_mathml_displaymode; |
||
61 | |||
62 | extern char * wims_mathml_remove_char(char * str , char * c); |
||
7396 | schaersvoo | 63 | extern void replace_str(const char *str, const char *old, const char *newer); |
5520 | bpr | 64 | #ifdef __cplusplus |
65 | } |
||
66 | #endif |
||
67 | |||
68 | #endif /* ! ITEX2MML_H */ |