
 history.txt
  interpreter script and structure access

 2.0d0 (2025-2026.04.12)
   bug fixes.
   added keyword operator and type casting.
   added small math library internal function calls.
   added my own 80-bit variant of rem_pio2 for accuracy.
   separated the number parsers and 80-bit glue from interpreter.c and ftrig.c.
   improved the 68k disassembler.
   makebasestring now takes an 64-bit integer argument.
   small improvement for sprint_float when printing doubles.
   disasm68k updated and released here.

   added _allow_key_init_point.
   partial support for keywords when opting for version 1.9.9.
   keywords can be 12 characters.
   asm/disasm6502 updated and released here.

 1.9.9 (2023.09.01-2025.01.14)
   bug fixes.
   corrected behavior of strcasecmp and strncasecmp.
   revised IUC table: now uses USC2 and private use for word break.
   parse_number now handles 0x1.MMpXX form.
   extensive work on scal10 producing exact numbers for 0-308 range.
   standardized literals in evaluation as part of the language.
   integer types in binary ops are 64-bit, 1.9.9-up.
   fix2double no longer forces low digits under 2 to 0. (major old mistake!)
   revised epow behavior to fit IEEE standards.
   the hardly used division sign, where supported, now does full division in full mode.
   i and e in script.c now I and E to free up the common lowercase as variables.
   numbers with an imaginary component now produce NaN with logical operators.
   divide before run-on multiply now handles the divide first in full mode.
   added PEMDAS/C expression precedence: 2+3*4+5=19; 3*2**8=768.

   80-bit sprint_float; adjusted parse_number to resolve inaccuracies.
   put callback parameters in state frame.
   makebasestring and sprint_float now take '+' input to always put sign.

   _print_tchars to opt to sprint to memory vs only file.
   decimal point and separator locale characters;
    number_parser now handles numbers like 1_234 (for 1,234.0) if enabled;
    sprint_float has separator option.

   bug fix for ternary conditionals.
   bug fixes for Unicode escapes and new-line standardization.
   bug fix for conjugate and add/etc. operator assuming precedence.
   fixed sprint_float 17-digit best rounding cases.
   handling of giant string number parsing.
   operators can now be internally customized/hybridized.
   expression and precedence bug fixes.

 1.9.8 (2022.03.08-2023.07.16)
   run-on number-variable multiply allowed in 1.9.8 regardless of complex.
   fixed major number parsing bug assuming decimal.
   underscores allowed in number parsing as separators.
   \p in literals ignores slash instead of crashing.
   fixed int8 bug in parsing literals. basic Unicode works.

   fixed a bug and compiler accuracy issue in scal10.
   `1e32-1e31-9e31` should result in 0; and `1e600`, inf for doubles.
   readanyintxx now returns largest negative when out of range.
 1.9.7 (2020.04.16-18)
   a few more corrections for exact results, notably epow(0,ni).
   added conjugate for complex mode - `(z*)`.
 1.9.6 (2020.04.15)
   increased accuracy of parse_number by adding top digit separately.
   unified epol2com for more accurate, consistent polar conversion.
   complex multiply and divide use polar math in worst case scenario.
 1.9.5 (2020.04.10)
   pi, C, e, phi, inf and nan are now constants in the executable.
   evaluated numbers are complex numbers (optional).
   implied multiply allowed for lowercase run-on (e.g., 2pi) if complex is on.
   sophisticated parse_number when PARSE_ANY_REAL is defined;
    handles inf and separates trailing '.'.
 1.9.4 (2015.07.16-17)
   added auto-bounding to print_tchars.
   calling convention fix for 64-bit (no other changes)
 1.9.3 (2014.08.11)
   forced long trec sizes (shorter wouldn't work with multi-param types).
   improved read-BE: arrays within trecs - double reverse-solidus,
    non-sequential version - shared offsets.
   arrays can have names: count-semicolon-name.
 1.9.2 (2014.04.09-10)
   fixed int32/long type mix-up (required for 64-bit systems).
 1.9.1
   var.c, script.c updated to work with SC/MrC
   fixed elem_tsize/read_typ_be type-loop bug that broke multi-prm. arrays.
 1.9 (2014.03.05)
   bug fixes and new implementations.
   minor revisions - dbl2uflt/uflt2dbl, some optimizations (_amcpy).
   revamped types, reducing non-string type count to 32.
    ability to customize multi-param. types, up to four parameters;
    - muti-param. types, however, require 32-bit storage (LONG_TREC).
    removed utck8.
    'u' unsigned suffix will force binary conversion for frc16/tck types;
    merged ifrc16 and ifro16; 'none' still recognized, '-1u' printed;
    - backward compatibility issue: pre-1.9 ini will parse -1u as -1.0.
   added by-type big endian binary loading, also at trec level;
    - way easier field management than manual bswapping (_2byte, _4byte).
 1.8.8 (2013.09.10)
   added Lua's 8-bit floating point type (_uflt8).
   bug fixes and future-use implementations.
   added .ini conditional enabling/disabling using evaluate_line;
    with type in tcon .z field (.p, or .c if type=0), [= <expression> ]
 1.8.7 (2013.08.26)
   added .ini '#' start-of-line comment and '`' to allowable name chars.
   added hex parsing for rgb data type ('#xxxxxx' or 'xx xx xx').
   URL names: '://' not taken as a comment, plus '&', '@', '?' and '='
    within second parameter (only).
   strings that work as names printed as names.
   fixed interpreter OR-to (|=>) and AND-to (&=>).
   routed out old and buggy/problematic list_item format;
    parse_textloop will simply return a boolean for Pascal/C.
   added NO_MIDOPWSP for faster parsing w. cost of syntax flexibility.
   implemented loops.
   moved and fixed up freadfile, get_hbuf_entry & eval_getv/eval_setv.
   fixed interp/ini object conflict by asigning different object names.
 1.8.6 (2013.08.22)
   fixed print_tchars not doing 3-digit octal sequence at end when needed.
   implemented .ini tcon arrays (xxx #n).
   renamed 'print_trec' to 'print_tdata' for a real print_trec.
   elipsis printed in place of "entry outside record" repeats.
   added 8-bit component versions of pt2d, pt3d, hv, rgb and styl.
   revised .ini parsing to use a full-state struct so long comments
    (/*...*/) in the middle of a line can contain new-line characters.
   fixed the trailing 9s that sometimes pops up w. fixed-point printing.
 1.8.4-1.8.5 (2013.08.02-08.05)
   parse_textloop is no longer automatic on the endquote char;
    post-quote returned, post-quote to be passed;
    this will require some usage rewrites, but allow for customization.
   parse_eval_literal returns NULL on overlong and empty literals;
    it also requires an endquote parameter.
   print_tchars: ',' endquote escapes both single & double quotes.
   added _e_overlong_data.
   added new .ini parameter types, including 3D points, 16-bit fixed-point
    types _font80, and moved _pt2d16 (prev. _pt16), _rgb48 and _rect16.
   revised/fixed .ini parsing altogether, not to mention bug fixes;
    split settrec into gettrec and settdata;
    parameter parsing takes text parameters separately;
    added '%', '|' and slash chars for names.
    a trec name starting with ';' is not dumped (for multiple read types);
    more/better ini_parse_line error detection.
 1.8.3 (2013.07.30)
   reintroduced line-ending count to sreadline.
   fixed non-ALLOW_DSTMOD (misplaced `else`).
   disabled dyadic error "discount 2nd" (error location).
   fixed MacRoman interpUCType right acute single quote, put sharp-S/thorn
    before Greek (sharp-S move fixes German range).
 1.8.2
   split read_ini into fread_ini and sread_ini.
 1.8.1 (2013.07.25)
   fixed interrogation-disabled getv and setv calls.
   added op to destination, such as add to (+=>) and...arith. shift (>>>=>).
   number destination detection (added _e_lvalue).
   due to some math libs, a**0 is bypassed, returning a/a.
   ini.c now does arrays (impl.: single element type, one for entire tcon);
  first trec name = backslash-decimal count (i.e., "\\20" for 20 count).
   added '#' to allowable ini name chars.
 1.8 (2013.07.15)
   public interpUCType, revamped to produce same results for the two major
    character sets (and entries were fixed).
   fixed _obj param separation for numeric, unary and ID.
   fixed label ordering for POCC debugging.
   fixed out-of-bounds `!=` and `~/` misread (wasn't checking s<e).
   finished print_tchars chars below space (STRICT_ESCAPES case too)
    (some separator ASCII chars will cause text-mode fgetc to return a negative).
   parse_textloop: '8' and '9' now allowed directly after an octal sequence.
    fixed octal/hex sequence count reset.

 1.7.9 (2013.06.29)
   fixed sreadline (to behave like freadline).
 1.7.8 (2013.06.09)
   fixed freadline double-escape bug - for `\\[eol]` the eol would be escaped.
 1.7.7 (2013.06.06)
   fixed stupid parse_textloop bug - `if(*_z) *_z=z;`.
 1.7.6 (2013.05.23)
   added ALLOW_DLITERALS, _e_value_set.
 1.7.5 (2013.05.20)
   added ALLOW_NAME_DOT and ALLOW_ESCNL.
 1.7.4 (2013.05.15)
   revised parse_textloop: custom parameter w. b func, removing 'a'.
   added parse_eval_literal and ALLOW_ELITERALS.
   fixed ALLOW_BIN_HI_LO.
   added fractasin (ftrig).
 1.7.3 (2013.05.12)
   clarified _e_return.
   added several more valid/future error codes (not used here).
   added long  #[..]# comments and NO_EBREAKS.
   _e_no_identifier (no longer 'ID error') returned for missing ID in setv.
 1.7.2 (2013.05.03)
   parse_parameter returns error, error position.
 1.7.1 (2013.04.26)
   unary * or % treated as start of possible ID.
   added optional high/low < and > unary operations.
   '@' taken as part of ID if indirection function is n/a.
 1.7 (2013.04.03)
   major bug fixes; .ini parser was broken on advancing contexts.
   a few size optimizations.

 1.6.6 (2013.04.02)
   non-breaking space parsing now optional - off by default.
   added parse_literal and readanyint64.
   a number of updates and fixes for .ini parsing:
    added comments; line escapes and single-quote text as literals;
    improved fraction type printing; added multi-parameter types (using commas).
 1.6.5 (2013.03.30)
   fixed parse_textloop octal sequence reading (3 excess and 'unset' bit set).
   added null ('Z') to finish single escapes for efficient string printing.
   added ini file reading/writing source.
   fixed POCC code generation recognition (enviro.h).
   added envx86 __asm for cntlz32 (ftrig.h).
 1.6.4 (2013.02.24)
   readying opcode base for transition;
    double-bnot (!!b); explicit "load indirect"; "load value" now 'a=b'.
 1.6.3 (2013.02.20)
   floating-point-friendly _not operation does -1-b instead of ~b.
   24-bit packing for short storage for doubles instead of byte as used w. integers.
   fixed return operator bug.
   added another workaround for another POCC integer cast bug (erroneous code).
   fixed freadline bug: 'd = p' was missing in reallocation for termination.
   parse_number: added exp clipping and manual base-10 scaling for accuracy.
 1.6 (2013.02.04-2013.02.17)
   freadline may take an allocated ptr, reallocs with zero (frees) on empty EOF;
  this distinguishes empty lines from EOF.
   fixed some syntax error detection cases.

   fixed evaluate_chunk long double case, 'r' in ALLOW_RUNON_WSP (added undef).

 1.5 (2012.11-2013.02.02)
   changed '\u' for UTF-8 generation (not implemented, though).
   another possible fix.

   implemented UTF-8 generation.
   completed non-standard escapes using capitals (case-sensitive).

   added STRICT_ESCAPES (compliance option).
   changed #4's 'T' to 'E', #29's 'g' to 'G'--still subj. to change until alpha version.
   fixed hang in evaluate_line string evaluation.
   updated operation bitmask constant; run-on multiplication works again.

   parse_textloop was post-incr'g instead of pre on escapes (fixed).

   universal C compatibility.
   implemented '##' comment.
   16-bit evalent; revised, cleaned pack format: as small as 2 bytes stored per number.
   fixed makebasestring bug: room for binary+sign (never used, however).

 1.4 (2011.06.12-2012.09.18)
   added setv for the ability to set identifiers, caller-optional.
    downside: only done by single identifier (no parentheses or ptr setting).

   added xreadline for easy reading of lines w/ optional escaped-line endings.
   added name hash to wordbreak.
   name & purpose change: parse_line/evaluate_line.

   expanded parse_textloop to do malloc str, fixed bugs; added \a and \b;
    also added non-standard escapes (whole alphabet).
   freadline no longer uses ungetc.

   few fixes to eliminate two warnings.
   _op_srt instead of _op_sqr.
   bug fix for strcasecmp; it expected results from the older table.

   op_type defined.

 1.3
   dvs now performs the equiv. of HyperTalk's 'div': full divide, then convert.
   exchanged positions for ceq/cne and cni/cid.

   parse_number bug fixes: E/e must follow digits, and +/- after digits are not
    part of the notation.

 1.2 (2010.10.22-2010.12)
   floating-point on by default
   ternary interrogations, such as `a?1:2` or `b?4` (zero if b is zero).

   op. list and character constants revised.
   CHR_DS (double-space) changed to CHR_NB.

   optional backward-compatibility: older symbols (CHR_HX).
   fixed an integer-base issue with 'native_eval'.

   standard: fractional digits ignored for integer input instead of syntax error.
   run-on multiplication disallowable when wsp comes in between.

 1.1 (2010.09.11)
   fp on by default, can do expr. like `.2~/2` (0.2 radical two).


   Older versions were simply part of MacFCEU, even using a 16+-byte "evalframe".
   Created 2008.08.12, first released 2008.08.25, 2010.02.10 is when things
  started looking like what you see today, only 6+24KB, no version numbers, only
  dates 2010.03.21, 2010.04.04, 2010.05.14...
