/itexToMML

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/itexToMML/
1 by Jacques Distler
Initial commit.
1
/*             itex2MML 1.1.8
2
 *   itex2MML.h last modified 9/14/2005
3
 */
4
5
#ifndef ITEX2MML_H
6
#define ITEX2MML_H
7
8
#ifdef __cplusplus
9
extern "C" {
10
#endif
11
12
  /* Step 1. Parse a buffer with itex source; return value is mathml, or 0 on failure (e.g., parse error).
13
   */
14
  extern char * itex2MML_parse (const char * buffer, unsigned long length);
15
16
  /* Step 2. Free the string from Step 1.
17
   */
18
  extern void   itex2MML_free_string (char * str);
19
20
21
  /* Alternatively, to filter generic source and converting embedded equations, use:
22
   */
23
  extern int    itex2MML_filter (const char * buffer, unsigned long length);
24
25
  extern int    itex2MML_html_filter (const char * buffer, unsigned long length);
26
27
28
  /* To change output methods:
29
   *
30
   * Note: If length is 0, then buffer is treated like a string; otherwise only length bytes are written.
31
   */
32
  extern void (*itex2MML_write) (const char * buffer, unsigned long length); /* default writes to stdout */
33
  extern void (*itex2MML_write_mathml) (const char * mathml);                /* default calls itex2MML_write(mathml,0) */
34
  extern void (*itex2MML_error) (const char * msg);                          /* default writes to stderr */
35
36
37
  /* Other stuff:
38
   */
39
  extern void   itex2MML_setup (const char * buffer, unsigned long length);
40
41
  extern void   itex2MML_restart ();
42
43
  extern char * itex2MML_copy_string (const char * str);
44
  extern char * itex2MML_copy_string_extra (const char * str, unsigned extra);
45
  extern char * itex2MML_copy2 (const char * first, const char * second);
46
  extern char * itex2MML_copy3 (const char * first, const char * second, const char * third);
47
  extern char * itex2MML_copy_escaped (const char * str);
48
49
  extern char * itex2MML_empty_string;
50
51
  extern int    itex2MML_lineno;
52
53
  extern int    itex2MML_rowposn;
54
  extern int    itex2MML_displaymode;
55
56
#ifdef __cplusplus
57
}
58
#endif
59
60
#endif /* ! ITEX2MML_H */