# HG changeset patch # User Paul Boddie # Date 1486998232 -3600 # Node ID 0b2226572c3887a83c13d0b885c6ad0e571118db # Parent 722f838eab064e9fe519c83fdd04013e97e5093a Used specific-width types for codes and positions, also switching to float for future floating point value support. diff -r 722f838eab06 -r 0b2226572c38 templates/types.h --- a/templates/types.h Mon Feb 13 15:35:36 2017 +0100 +++ b/templates/types.h Mon Feb 13 16:03:52 2017 +0100 @@ -22,10 +22,12 @@ /* Define code and position types, populated by enum values defined for each program specifically. */ -typedef unsigned short __code; -typedef unsigned short __pos; -typedef unsigned short __pcode; -typedef unsigned short __ppos; +#include + +typedef uint16_t __code; +typedef uint16_t __pos; +typedef uint16_t __pcode; +typedef uint16_t __ppos; /* Attribute tables are lists of codes confirming the presence of attributes. */ @@ -76,7 +78,7 @@ __attr (*fn)(); /* callable details */ }; int intvalue; /* integer value */ - double floatvalue; /* floating point value */ + float floatvalue; /* floating point value */ char * strvalue; /* string value */ __fragment * seqvalue; /* sequence data */ void * datavalue; /* object-specific data */