~crc_/retroforth

d86e97e162b1efa0ac6217f76bb5d7fadb07a67a — crc 5 months ago 7c29018
slightly smaller/faster backspace handling; more use of d:set-source

FossilOrigin-Name: 0bf6a56da51afac0f4dde0c18df3d5f06a6c5c0aba846b382e7b6f2c8531f935
5 files changed, 66 insertions(+), 66 deletions(-)

M image/build.retro
M interface/retro-unix.retro
M interface/scripting.retro
M ngaImage
M vm/nga-c/image.c
M image/build.retro => image/build.retro +1 -1
@@ 1,3 1,3 @@
~~~
#16 'BUILD const
#18 'BUILD const
~~~

M interface/retro-unix.retro => interface/retro-unix.retro +2 -2
@@ 66,10 66,10 @@ startup flags passed.
                     [ ASCII:SPACE eq? ] tri or or ;
  (c-f)  :eol?       @EOT [ ASCII:CR eq? ] [ ASCII:LF eq? ] bi or ;
  (s-sf) :valid?     dup s:length n:strictly-positive? ;
  (c-c)  :check-eof  dup [ #-1 eq? ] [ ASCII:EOT eq? ] bi or [ bye ] if ;
  (c-c)  :check-eof  dup [ #-1 eq? ] [ ASCII:EOT eq? ] bi or &bye if ;
         :bs         buffer:size #2 gteq?
                     [ buffer:get drop ] if buffer:get drop ;
  (c-c)  :check-bs   dup [ ASCII:BS eq? ] [ ASCII:DEL eq? ] bi or [ bs ] if ;
  (c-c)  :check-bs   dup [ ASCII:BS eq? ] [ ASCII:DEL eq? ] bi or &bs if ;
  (c-c)  :check      check-eof check-bs ;
  (-c)   :character  c:get dup buffer:add ;
  (q-)   :buffer     [ TIB buffer:set call buffer:start ] buffer:preserve ;

M interface/scripting.retro => interface/scripting.retro +10 -10
@@ 59,15 59,15 @@ Adds support for obtaining current source line text
## d:source

~~~
'interface/scripting.retro s:dedup
dup 'abort d:lookup d:source store
dup 'script:abort-include d:lookup d:source store
dup 'script:ignore-to-eol d:lookup d:source store
dup 'script:current-line d:lookup d:source store
dup 'script:current-file d:lookup d:source store
dup 'script:name d:lookup d:source store
dup 'include d:lookup d:source store
dup 'script:get-argument d:lookup d:source store
dup 'script:arguments d:lookup d:source store
'interface/scripting.retro
dup 'abort                d:set-source
dup 'script:abort-include d:set-source
dup 'script:ignore-to-eol d:set-source
dup 'script:current-line  d:set-source
dup 'script:current-file  d:set-source
dup 'script:name          d:set-source
dup 'include              d:set-source
dup 'script:get-argument  d:set-source
dup 'script:arguments     d:set-source
drop
~~~

M ngaImage => ngaImage +0 -0
M vm/nga-c/image.c => vm/nga-c/image.c +53 -53
@@ 10,8 10,8 @@
#define CELL_MAX LLONG_MAX - 1
#endif
#endif
CELL ngaImageCells = 19893;
CELL ngaImage[] = { 1793,19399,19848,19892,202309,417,389,1249,1535,0,11254,0,10,1,10,2,10,3,10,
CELL ngaImageCells = 19883;
CELL ngaImage[] = { 1793,19389,19838,19882,202309,417,389,1249,1535,0,11254,0,10,1,10,2,10,3,10,
                       4,10,5,10,6,10,7,10,8,10,11,10,12,10,13,10,14,10,15,10,
                       16,10,17,10,18,10,19,10,20,10,21,10,22,10,23,10,24,10,25,68223234,
                       1,2575,85000450,1,656912,163,180,268505089,65,64,285281281,0,65,2063,10,101384453,0,9,10,68485378,


@@ 20,7 20,7 @@ CELL ngaImage[] = { 1793,19399,19848,19892,202309,417,389,1249,1535,0,11254,0,10
                       1,251790353,101777669,1,17565186,109,524545,113,66,167838467,-1,134287105,3,61,659457,3,459023,130,2049,58,
                       25,2049,130,1793,137,2049,137,117506307,0,130,0,524545,28,135,168820993,0,149,1642241,149,134283523,
                       13,135,1793,130,524545,2049,130,1793,130,16846593,149,163,180,1793,66,16846593,149,135,180,1793,
                       66,7,10,659713,1,659713,2,659713,3,659713,4,659713,5,1793,19645,17108737,3,2,524559,130,
                       66,7,10,659713,1,659713,2,659713,3,659713,4,659713,5,1793,19635,17108737,3,2,524559,130,
                       2049,130,2049,130,524545,0,130,524545,0,130,2049,144,1048838,2,1642241,10,7,18648,8246457295145463473,167841793,
                       216,11,17826049,0,216,2,15,25,524546,17986,134287105,217,29,2305,218,459023,226,2049,4875,134287361,
                       217,221,659201,216,10,659969,7,2049,58,25,17694978,58,244,9,84152833,48,319750404,243,117507601,246,


@@ 170,7 170,7 @@ CELL ngaImage[] = { 1793,19399,19848,19892,202309,417,389,1249,1535,0,11254,0,10
                       110,58,105,110,99,0,659713,1,10,3114,3139,168,12041,210720197721,110,58,100,101,99,0,
                       659969,1,10,3128,3158,168,12041,8246617666422322998,110,58,98,101,116,119,101,101,110,63,0,67503109,
                       1793,3166,67503109,67503109,2049,3106,10,1,3161,2049,2241,11,10,3142,3187,168,12041,249861296566813883,83,99,
                       111,112,101,76,105,115,116,0,19750,19804,10,3172,3198,168,12041,5864091,123,123,0,2049,
                       111,112,101,76,105,115,116,0,19740,19794,10,3172,3198,168,12041,5864091,123,123,0,2049,
                       1576,2,1,3187,2049,61,16,10,3190,3225,168,12041,-6305314778776785742,45,45,45,114,101,118,101,
                       97,108,45,45,45,0,2049,1576,1,3187,2049,3125,16,10,3207,3241,168,12041,5864159,125,
                       125,0,1,3187,2049,58,4,15,11,1793,3255,3841,3187,4097,2,10,1,3250,1793,3281,


@@ 574,7 574,7 @@ CELL ngaImage[] = { 1793,19399,19848,19892,202309,417,389,1249,1535,0,11254,0,10
                       115,116,101,110,0,2049,11148,2049,11035,1,417,1,17,2049,66,1,11204,7,10,11192,
                       11239,156,12041,-213800119713087686,100,58,72,97,115,104,45,70,117,110,99,116,105,111,110,0,
                       4875,11218,11254,168,12041,7572226109254526,100,58,114,101,104,97,115,104,0,1793,11272,1793,11264,2049,
                       190,3841,11239,8,10,1,11258,2049,2241,2049,188,16,10,1,11256,2049,8491,10,11240,16,
                       190,3841,11239,8,10,1,11258,2049,2241,2049,188,16,10,1,11256,2049,8491,10,11240,17,
                       156,0,210668957237,66,85,73,76,68,0,11277,11299,168,0,210709067314,99,111,109,109,97,0,
                       2049,130,10,11288,11312,168,0,6385123288,99,111,110,115,0,2049,1977,1793,11322,4,2049,11299,
                       2049,11299,10,1,11316,2049,2229,10,11302,11336,168,0,193488123,99,97,114,0,10,11327,11346,


@@ 942,17 942,17 @@ CELL ngaImage[] = { 1793,19399,19848,19892,202309,417,389,1249,1535,0,11254,0,10
                       117,98,108,101,0,2,1,1,2049,18537,15,5,2049,18477,6,10,18542,18597,168,0,
                       1730340976492540563,109,101,109,58,115,116,111,114,101,45,100,111,117,98,108,101,0,5,5,
                       2049,2217,1,1,2049,18537,6,2049,18457,6,2049,18457,10,1793,18633,1,192,1,2,17,
                       8,2049,1576,2049,190,3841,11239,8,2049,1576,2049,188,16,10,1,18614,18575,18644,168,19409,
                       193470948,84,73,66,0,1,7,15,10,18635,18664,168,19409,8246457295145463473,105,109,97,103,101,58,
                       8,2049,1576,2049,190,3841,11239,8,2049,1576,2049,188,16,10,1,18614,18575,18644,168,19399,
                       193470948,84,73,66,0,1,7,15,10,18635,18664,168,19399,8246457295145463473,105,109,97,103,101,58,
                       115,97,118,101,0,1,1000,2049,10812,2049,10793,10,18648,18682,168,0,210711039690,101,100,105,
                       116,63,0,2,1793,18689,1,8,11,10,1,18685,1793,18697,1,127,11,10,1,18693,
                       2049,2255,22,10,18671,18715,168,0,6953539406400,103,97,116,104,101,114,0,2049,18682,1,17,
                       1,4134,2049,66,10,18703,18735,168,0,210709415765,99,121,99,108,101,0,2049,11123,2049,2217,
                       4,8,2049,2644,25,3,2049,18715,1,18735,7,10,18648,18768,168,19409,-4557881830897049127,112,97,114,
                       4,8,2049,2644,25,3,2049,18715,1,18735,7,10,18648,18768,168,19399,-4557881830897049127,112,97,114,
                       115,101,45,117,110,116,105,108,0,1793,18780,2049,4451,2049,4234,2049,18735,771,2049,4096,
                       10,1,18770,2049,4260,10,18751,18796,168,19409,210726130610,115,58,103,101,116,0,1793,18818,1793,
                       10,1,18770,2049,4260,10,18751,18796,168,19399,210726130610,115,58,103,101,116,0,1793,18818,1793,
                       18804,1,13,11,10,1,18800,1793,18812,1,10,11,10,1,18808,2049,2255,22,10,1,
                       18798,2049,18768,10,18785,18834,168,19409,210708950412,99,108,101,97,114,0,2049,4472,92,94,91,
                       18798,2049,18768,10,18785,18834,168,19399,210708950412,99,108,101,97,114,0,2049,4472,92,94,91,
                       50,74,92,94,91,48,59,48,72,0,1,18836,2049,8246,2049,10918,10,18823,18865,156,
                       0,193454829,69,79,84,0,0,18856,18880,156,0,7571133383038306,73,103,110,111,114,105,110,103,
                       0,0,18866,18896,168,0,249892406716047873,105,103,110,111,114,105,110,103,63,0,3841,18880,10,


@@ 963,46 963,46 @@ CELL ngaImage[] = { 1793,19399,19848,19892,202309,417,389,1249,1535,0,11254,0,10
                       1,18975,1793,18987,1,10,11,10,1,18983,2049,2255,22,10,18961,19005,168,0,6954126150804,118,
                       97,108,105,100,63,0,2,2049,104,2049,2812,10,18993,19026,168,0,249883998779477802,99,104,101,
                       99,107,45,101,111,102,0,2,1793,19033,1,-1,11,10,1,19029,1793,19041,1,4,
                       11,10,1,19037,2049,2255,22,1793,19051,2049,11190,10,1,19048,9,10,19011,19063,168,0,
                       5863258,98,115,0,2049,4212,1,2,2049,2675,1793,19075,2049,4160,3,10,1,19071,9,2049,
                       4160,3,10,19055,19096,168,0,7572242387256805,99,104,101,99,107,45,98,115,0,2,1793,19103,
                       1,8,11,10,1,19099,1793,19111,1,127,11,10,1,19107,2049,2255,22,1793,19121,2049,
                       19063,10,1,19118,9,10,19082,19136,168,0,210708806723,99,104,101,99,107,0,2049,19026,2049,
                       19096,10,19125,19156,168,0,249883994190734226,99,104,97,114,97,99,116,101,114,0,2049,11123,2,
                       2049,4134,10,19141,19174,168,0,6953366942559,98,117,102,102,101,114,0,1793,19184,2049,18644,2049,
                       4234,8,2049,4096,10,1,19176,2049,4260,10,19162,19205,168,0,8246863741238799215,114,101,97,100,45,
                       116,111,107,101,110,0,1793,19221,1793,19216,2049,19156,2049,19136,2049,18929,10,1,19209,2049,
                       2397,10,1,19207,2049,19174,2049,4587,10,19189,19239,168,0,210716150453,105,110,112,117,116,0,
                       2049,19205,2049,19005,10,19228,19257,168,0,229479082815460,112,114,111,99,101,115,115,0,2049,18896,
                       1793,19275,771,2049,18971,1793,19271,1,18880,2049,3931,10,1,19266,9,10,1,19261,2049,2862,
                       1,417,1,17,2049,66,10,18823,19294,180,19409,5861507,47,47,0,2049,16564,1,18880,2049,
                       3916,10,19286,19313,168,19409,6953343520347,98,97,110,110,101,114,0,2049,18912,2049,4472,82,69,
                       84,82,79,32,49,50,32,40,37,110,46,37,110,41,92,110,0,1,19317,2049,
                       8246,2049,10918,2049,9335,2049,1545,2049,9335,18,2049,1545,2049,4472,37,110,32,77,97,120,
                       44,32,37,110,32,85,115,101,100,44,32,37,110,32,70,114,101,101,92,110,
                       0,1,19353,2049,8246,2049,10918,10,19301,19399,168,19409,6953744547860,108,105,115,116,101,110,0,
                       2049,19313,2049,19239,2049,19257,1,19401,7,10,105,110,116,101,114,102,97,99,101,47,
                       114,101,116,114,111,45,117,110,105,120,46,114,101,116,114,111,0,19387,19449,156,
                       0,229441520490121,83,111,117,114,99,101,115,0,1,19698,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19436,19589,
                       168,0,6953711201841,107,110,111,119,110,63,0,2,1,19449,2049,9099,10,19577,19606,168,0,
                       210716136861,105,110,100,101,120,0,1,19449,4,2049,9775,1,19449,4,2049,9245,10,19595,19629,
                       168,0,6953974036516,114,101,99,111,114,100,0,2049,4500,2,1,19449,2049,3864,3841,19449,1,
                       19449,17,16,10,1793,19696,2049,16499,2049,19589,1793,19654,2049,19606,10,1,19651,1793,19661,2049,
                       19629,10,1,19658,2049,66,1793,19674,1,192,1,2,17,8,10,1,19667,2049,2229,2049,
                       1576,2049,186,16,2049,1576,2049,190,3841,11239,8,2049,1576,2049,188,16,10,1,19645,100,
                       105,99,116,45,119,111,114,100,115,45,108,105,115,116,105,110,103,46,102,111,
                       114,116,104,0,19387,19736,168,19698,229461403550098,100,58,119,111,114,100,115,0,1793,19745,2049,
                       190,2049,10918,2049,10888,10,1,19738,2049,8491,10,19723,19768,168,19698,-3502157631813457253,100,58,119,111,
                       114,100,115,45,119,105,116,104,0,2049,1977,2049,5573,1793,19799,2049,190,2,2049,1977,
                       2049,5286,1793,19788,2049,10918,2049,10888,10,1,19783,1793,19794,3,10,1,19792,2049,66,10,
                       1,19774,2049,8491,10,19750,19825,168,19698,2818131571306626127,100,105,115,112,108,97,121,45,105,102,
                       45,108,101,102,116,0,2,2049,1977,2049,5519,1793,19837,2049,10918,2049,10888,10,1,19832,
                       1793,19843,3,10,1,19841,2049,66,10,19750,19876,168,19698,2947807019553410009,100,58,119,111,114,100,
                       115,45,98,101,103,105,110,110,105,110,103,45,119,105,116,104,0,2049,1977,2049,
                       5573,1793,19887,2049,190,2049,19825,10,1,19882,2049,8491,10,0 };
                       11,10,1,19037,2049,2255,22,1,11190,9,10,19011,19058,168,0,5863258,98,115,0,2049,
                       4212,1,2,2049,2675,1793,19070,2049,4160,3,10,1,19066,9,2049,4160,3,10,19050,19091,
                       168,0,7572242387256805,99,104,101,99,107,45,98,115,0,2,1793,19098,1,8,11,10,1,
                       19094,1793,19106,1,127,11,10,1,19102,2049,2255,22,1,19058,9,10,19077,19126,168,0,
                       210708806723,99,104,101,99,107,0,2049,19026,2049,19091,10,19115,19146,168,0,249883994190734226,99,104,97,
                       114,97,99,116,101,114,0,2049,11123,2,2049,4134,10,19131,19164,168,0,6953366942559,98,117,
                       102,102,101,114,0,1793,19174,2049,18644,2049,4234,8,2049,4096,10,1,19166,2049,4260,10,
                       19152,19195,168,0,8246863741238799215,114,101,97,100,45,116,111,107,101,110,0,1793,19211,1793,19206,
                       2049,19146,2049,19126,2049,18929,10,1,19199,2049,2397,10,1,19197,2049,19164,2049,4587,10,19179,
                       19229,168,0,210716150453,105,110,112,117,116,0,2049,19195,2049,19005,10,19218,19247,168,0,229479082815460,
                       112,114,111,99,101,115,115,0,2049,18896,1793,19265,771,2049,18971,1793,19261,1,18880,2049,
                       3931,10,1,19256,9,10,1,19251,2049,2862,1,417,1,17,2049,66,10,18823,19284,180,
                       19399,5861507,47,47,0,2049,16564,1,18880,2049,3916,10,19276,19303,168,19399,6953343520347,98,97,110,
                       110,101,114,0,2049,18912,2049,4472,82,69,84,82,79,32,49,50,32,40,37,110,
                       46,37,110,41,92,110,0,1,19307,2049,8246,2049,10918,2049,9335,2049,1545,2049,9335,18,
                       2049,1545,2049,4472,37,110,32,77,97,120,44,32,37,110,32,85,115,101,100,44,
                       32,37,110,32,70,114,101,101,92,110,0,1,19343,2049,8246,2049,10918,10,19291,19389,
                       168,19399,6953744547860,108,105,115,116,101,110,0,2049,19303,2049,19229,2049,19247,1,19391,7,10,
                       105,110,116,101,114,102,97,99,101,47,114,101,116,114,111,45,117,110,105,120,
                       46,114,101,116,114,111,0,19377,19439,156,0,229441520490121,83,111,117,114,99,101,115,0,
                       1,19688,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                       0,0,0,0,0,0,0,0,19426,19579,168,0,6953711201841,107,110,111,119,110,63,0,
                       2,1,19439,2049,9099,10,19567,19596,168,0,210716136861,105,110,100,101,120,0,1,19439,4,
                       2049,9775,1,19439,4,2049,9245,10,19585,19619,168,0,6953974036516,114,101,99,111,114,100,0,
                       2049,4500,2,1,19439,2049,3864,3841,19439,1,19439,17,16,10,1793,19686,2049,16499,2049,19579,
                       1793,19644,2049,19596,10,1,19641,1793,19651,2049,19619,10,1,19648,2049,66,1793,19664,1,192,
                       1,2,17,8,10,1,19657,2049,2229,2049,1576,2049,186,16,2049,1576,2049,190,3841,11239,
                       8,2049,1576,2049,188,16,10,1,19635,100,105,99,116,45,119,111,114,100,115,45,
                       108,105,115,116,105,110,103,46,102,111,114,116,104,0,19377,19726,168,19688,229461403550098,100,
                       58,119,111,114,100,115,0,1793,19735,2049,190,2049,10918,2049,10888,10,1,19728,2049,8491,
                       10,19713,19758,168,19688,-3502157631813457253,100,58,119,111,114,100,115,45,119,105,116,104,0,2049,
                       1977,2049,5573,1793,19789,2049,190,2,2049,1977,2049,5286,1793,19778,2049,10918,2049,10888,10,1,
                       19773,1793,19784,3,10,1,19782,2049,66,10,1,19764,2049,8491,10,19740,19815,168,19688,2818131571306626127,
                       100,105,115,112,108,97,121,45,105,102,45,108,101,102,116,0,2,2049,1977,2049,
                       5519,1793,19827,2049,10918,2049,10888,10,1,19822,1793,19833,3,10,1,19831,2049,66,10,19740,
                       19866,168,19688,2947807019553410009,100,58,119,111,114,100,115,45,98,101,103,105,110,110,105,110,
                       103,45,119,105,116,104,0,2049,1977,2049,5573,1793,19877,2049,190,2049,19815,10,1,19872,
                       2049,8491,10,0 };