/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/itex2MML.l

  • Committer: Jacques Distler
  • Date: 2016-08-14 21:56:27 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20160814215627-s85ojfrb4unki05t
Tags: 1.5.3
itex2MML 1.5.3

Build fixes for Bison3 and Ruby.
Buffer length type: unsigned long => size_t.
Fix an issue on Windows (and possibly other) Ruby platforms.
  (Thanks to Rod McGuire and David Aaron Fendley)
Clean up itex_stringsupport.rb.
Update tests.

Show diffs side-by-side

added added

removed removed

1
 
/*             itex2MML 1.5.1
2
 
 *   itex2MML.l last modified 1/5/2014
 
1
/*             itex2MML 1.5.3
 
2
 *   itex2MML.l last modified 8/13/2016
3
3
 */
4
4
 
5
5
%{
17
17
#define YY_NEVER_INTERACTIVE 1
18
18
#define YY_INPUT(buffer,result,max_size) result = s_itex2MML_read (buffer, max_size)
19
19
 
20
 
static int s_itex2MML_read (char * buffer, int max_size);
 
20
static size_t s_itex2MML_read (char * buffer, size_t max_size);
 
21
void itex2MML_do_capture_eqn();
 
22
void itex2MML_capture_eqn_src();
21
23
 
22
24
#define yylval itex2MML_yylval
23
25
#define itex2MML_optarg_depth 100
1108
1110
        s_itex2MML_length = length;
1109
1111
}
1110
1112
 
1111
 
int itex2MML_capture_eqn_src()
 
1113
void itex2MML_capture_eqn_src()
1112
1114
{
1113
1115
        if (YY_START != INITIAL && YY_START != SVGENV)
1114
1116
                itex2MML_do_capture_eqn();
1115
1117
}
1116
1118
 
1117
 
int itex2MML_do_capture_eqn()
 
1119
void itex2MML_do_capture_eqn()
1118
1120
{
1119
1121
        if (itex2MML_eqn_bufsize - (itex2MML_eqn_end-itex2MML_eqn_src+yyleng) > 1)
1120
1122
        {
1123
1125
        }
1124
1126
}
1125
1127
 
1126
 
static int s_itex2MML_read (char * buffer, int max_size)
 
1128
static size_t s_itex2MML_read (char * buffer, size_t max_size)
1127
1129
{
1128
 
        int result = 0;
 
1130
        size_t result = 0;
1129
1131
 
1130
1132
        if (max_size < s_itex2MML_length)
1131
1133
        {