/** A tables-reader object to maintain some state in the read. */
struct yytbl_reader {
FILE * fp; /**< input stream */
- uint32_t bread; /**< bytes read since beginning of current tableset */
+ flex_uint32_t bread; /**< bytes read since beginning of current tableset */
};
%endif
static int yytbl_read8 (void *v, struct yytbl_reader * rd)
{
errno = 0;
- if (fread (v, sizeof (uint8_t), 1, rd->fp) != 1){
+ if (fread (v, sizeof (flex_uint8_t), 1, rd->fp) != 1){
errno = EIO;
return -1;
}
- rd->bread += sizeof(uint8_t);
+ rd->bread += sizeof(flex_uint8_t);
return 0;
}
static int yytbl_read16 (void *v, struct yytbl_reader * rd)
{
errno = 0;
- if (fread (v, sizeof (uint16_t), 1, rd->fp) != 1){
+ if (fread (v, sizeof (flex_uint16_t), 1, rd->fp) != 1){
errno = EIO;
return -1;
}
- *((uint16_t *) v) = ntohs (*((uint16_t *) v));
- rd->bread += sizeof(uint16_t);
+ *((flex_uint16_t *) v) = ntohs (*((flex_uint16_t *) v));
+ rd->bread += sizeof(flex_uint16_t);
return 0;
}
static int yytbl_read32 (void *v, struct yytbl_reader * rd)
{
errno = 0;
- if (fread (v, sizeof (uint32_t), 1, rd->fp) != 1){
+ if (fread (v, sizeof (flex_uint32_t), 1, rd->fp) != 1){
errno = EIO;
return -1;
}
- *((uint32_t *) v) = ntohl (*((uint32_t *) v));
- rd->bread += sizeof(uint32_t);
+ *((flex_uint32_t *) v) = ntohl (*((flex_uint32_t *) v));
+ rd->bread += sizeof(flex_uint32_t);
return 0;
}
* YYTD_STRUCT for the yy_transition array.
*/
for (j = 0; j < inner_loop_count; j++, i++) {
- int32_t t32;
+ flex_int32_t t32;
/* read into t32 no matter what the real size is. */
{
- int16_t t16;
- int8_t t8;
+ flex_int16_t t16;
+ flex_int8_t t8;
switch (YYTDFLAGS2BYTES (td.td_flags)) {
- case sizeof (int32_t):
+ case sizeof (flex_int32_t):
rv = yytbl_read32 (&t32, rd);
break;
- case sizeof (int16_t):
+ case sizeof (flex_int16_t):
rv = yytbl_read16 (&t16, rd);
t32 = t16;
break;
- case sizeof (int8_t):
+ case sizeof (flex_int8_t):
rv = yytbl_read8 (&t8, rd);
t32 = t8;
break;
: &(((struct yy_trans_info *) p)->yy_nxt);
switch (dmap->dm_sz) {
- case sizeof (int32_t):
+ case sizeof (flex_int32_t):
if (M4_YY_TABLES_VERIFY){
- if( ((int32_t *) v)[0] != (int32_t) t32)
- yy_fatal_error("tables verification failed at YYTD_STRUCT int32_t" M4_YY_CALL_LAST_ARG);
+ if( ((flex_int32_t *) v)[0] != (flex_int32_t) t32)
+ yy_fatal_error("tables verification failed at YYTD_STRUCT flex_int32_t" M4_YY_CALL_LAST_ARG);
}else
- ((int32_t *) v)[0] = (int32_t) t32;
+ ((flex_int32_t *) v)[0] = (flex_int32_t) t32;
break;
- case sizeof (int16_t):
+ case sizeof (flex_int16_t):
if (M4_YY_TABLES_VERIFY ){
- if(((int16_t *) v)[0] != (int16_t) t32)
- yy_fatal_error("tables verification failed at YYTD_STRUCT int16_t" M4_YY_CALL_LAST_ARG);
+ if(((flex_int16_t *) v)[0] != (flex_int16_t) t32)
+ yy_fatal_error("tables verification failed at YYTD_STRUCT flex_int16_t" M4_YY_CALL_LAST_ARG);
}else
- ((int16_t *) v)[0] = (int16_t) t32;
+ ((flex_int16_t *) v)[0] = (flex_int16_t) t32;
break;
- case sizeof(int8_t):
+ case sizeof(flex_int8_t):
if (M4_YY_TABLES_VERIFY ){
- if( ((int8_t *) v)[0] != (int8_t) t32)
- yy_fatal_error("tables verification failed at YYTD_STRUCT int8_t" M4_YY_CALL_LAST_ARG);
+ if( ((flex_int8_t *) v)[0] != (flex_int8_t) t32)
+ yy_fatal_error("tables verification failed at YYTD_STRUCT flex_int8_t" M4_YY_CALL_LAST_ARG);
}else
- ((int8_t *) v)[0] = (int8_t) t32;
+ ((flex_int8_t *) v)[0] = (flex_int8_t) t32;
break;
default:
yy_fatal_error("invalid dmap->dm_sz for struct" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);
else {
/* t32 is a plain int. copy data, then incrememnt p. */
switch (dmap->dm_sz) {
- case sizeof (int32_t):
+ case sizeof (flex_int32_t):
if(M4_YY_TABLES_VERIFY ){
- if( ((int32_t *) p)[0] != (int32_t) t32)
- yy_fatal_error("tables verification failed at int32_t" M4_YY_CALL_LAST_ARG);
+ if( ((flex_int32_t *) p)[0] != (flex_int32_t) t32)
+ yy_fatal_error("tables verification failed at flex_int32_t" M4_YY_CALL_LAST_ARG);
}else
- ((int32_t *) p)[0] = (int32_t) t32;
- p = ((int32_t *) p) + 1;
+ ((flex_int32_t *) p)[0] = (flex_int32_t) t32;
+ p = ((flex_int32_t *) p) + 1;
break;
- case sizeof (int16_t):
+ case sizeof (flex_int16_t):
if(M4_YY_TABLES_VERIFY ){
- if( ((int16_t *) p)[0] != (int16_t) t32)
- yy_fatal_error("tables verification failed at int16_t" M4_YY_CALL_LAST_ARG);
+ if( ((flex_int16_t *) p)[0] != (flex_int16_t) t32)
+ yy_fatal_error("tables verification failed at flex_int16_t" M4_YY_CALL_LAST_ARG);
}else
- ((int16_t *) p)[0] = (int16_t) t32;
- p = ((int16_t *) p) + 1;
+ ((flex_int16_t *) p)[0] = (flex_int16_t) t32;
+ p = ((flex_int16_t *) p) + 1;
break;
- case sizeof (int8_t):
+ case sizeof (flex_int8_t):
if(M4_YY_TABLES_VERIFY ){
- if( ((int8_t *) p)[0] != (int8_t) t32)
- yy_fatal_error("tables verification failed at int8_t" M4_YY_CALL_LAST_ARG);
+ if( ((flex_int8_t *) p)[0] != (flex_int8_t) t32)
+ yy_fatal_error("tables verification failed at flex_int8_t" M4_YY_CALL_LAST_ARG);
}else
- ((int8_t *) p)[0] = (int8_t) t32;
- p = ((int8_t *) p) + 1;
+ ((flex_int8_t *) p)[0] = (flex_int8_t) t32;
+ p = ((flex_int8_t *) p) + 1;
break;
default:
yy_fatal_error("invalid dmap->dm_sz for plain int" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);
int pad;
pad = yypad64(rd->bread);
while(--pad >= 0){
- int8_t t8;
+ flex_int8_t t8;
if(yytbl_read8(&t8,rd) != 0)
return -1;
}