/itexToMML

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/itexToMML/

« back to all changes in this revision

Viewing changes to itex-src/perl/itex2MML.h

  • Committer: Jacques Distler
  • Date: 2019-01-03 19:26:23 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20190103192623-k4p7dta8r62qwyr2
Perl bindings

Show diffs side-by-side

added added

removed removed

 
1
/*             itex2MML 1.5.8
 
2
 *   itex2MML.h last modified 10/19/2018
 
3
 */
 
4
 
 
5
#ifndef ITEX2MML_H
 
6
#define ITEX2MML_H
 
7
 
 
8
#define ITEX2MML_VERSION "1.5.8"
 
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
  extern char * itex2MML_parse (const char * buffer, size_t 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, size_t length);
 
26
 
 
27
  extern int    itex2MML_html_filter (const char * buffer, size_t length);
 
28
  extern int    itex2MML_strict_html_filter (const char * buffer, size_t length);
 
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, size_t 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, size_t 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 */