bzr branch
http://golem.ph.utexas.edu/~distler/code/itexToMML/
|
55
by Jacques Distler
itex2MML 1.4.1: Memory issue |
1 |
/* itex2MML 1.4.1 |
|
54
by Jacques Distler
itex2MML 1.4.0: Extensible Arrows |
2 |
* itex2MML.h last modified 9/7/2010 |
|
1
by Jacques Distler
Initial commit. |
3 |
*/ |
4 |
||
5 |
#ifndef ITEX2MML_H |
|
6 |
#define ITEX2MML_H |
|
7 |
||
|
55
by Jacques Distler
itex2MML 1.4.1: Memory issue |
8 |
#define ITEX2MML_VERSION "1.4.1" |
|
27
by Jacques Distler
Version 1.3.3 |
9 |
|
|
1
by Jacques Distler
Initial commit. |
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 |
extern char * itex2MML_parse (const char * buffer, unsigned long length); |
|
17 |
||
18 |
/* Step 2. Free the string from Step 1. |
|
19 |
*/ |
|
20 |
extern void itex2MML_free_string (char * str); |
|
21 |
||
22 |
||
23 |
/* Alternatively, to filter generic source and converting embedded equations, use: |
|
24 |
*/ |
|
25 |
extern int itex2MML_filter (const char * buffer, unsigned long length); |
|
26 |
||
27 |
extern int itex2MML_html_filter (const char * buffer, unsigned long length); |
|
|
23
by Jacques Distler
Angle Brackets |
28 |
extern int itex2MML_strict_html_filter (const char * buffer, unsigned long length); |
|
1
by Jacques Distler
Initial commit. |
29 |
|
30 |
||
31 |
/* To change output methods: |
|
32 |
* |
|
33 |
* Note: If length is 0, then buffer is treated like a string; otherwise only length bytes are written. |
|
34 |
*/ |
|
35 |
extern void (*itex2MML_write) (const char * buffer, unsigned long length); /* default writes to stdout */ |
|
36 |
extern void (*itex2MML_write_mathml) (const char * mathml); /* default calls itex2MML_write(mathml,0) */ |
|
37 |
extern void (*itex2MML_error) (const char * msg); /* default writes to stderr */ |
|
38 |
||
39 |
||
40 |
/* Other stuff: |
|
41 |
*/ |
|
42 |
extern void itex2MML_setup (const char * buffer, unsigned long length); |
|
43 |
||
44 |
extern void itex2MML_restart (); |
|
45 |
||
46 |
extern char * itex2MML_copy_string (const char * str); |
|
47 |
extern char * itex2MML_copy_string_extra (const char * str, unsigned extra); |
|
48 |
extern char * itex2MML_copy2 (const char * first, const char * second); |
|
49 |
extern char * itex2MML_copy3 (const char * first, const char * second, const char * third); |
|
50 |
extern char * itex2MML_copy_escaped (const char * str); |
|
51 |
||
52 |
extern char * itex2MML_empty_string; |
|
53 |
||
54 |
extern int itex2MML_lineno; |
|
55 |
||
56 |
extern int itex2MML_rowposn; |
|
57 |
extern int itex2MML_displaymode; |
|
58 |
||
59 |
#ifdef __cplusplus |
|
60 |
} |
|
61 |
#endif |
|
62 |
||
63 |
#endif /* ! ITEX2MML_H */ |