no longer display unu warning on source files with only test blocks

FossilOrigin-Name: 41deb926a327e7856ae215c024fb577cfcf82f0483459affb05ead131fe6ffd0
This commit is contained in:
crc 2022-08-29 23:17:29 +00:00
parent 43cd6ac936
commit 2da8605f90
3 changed files with 88 additions and 45 deletions

View file

@ -1,42 +1,13 @@
# RetroForth 2022.8 Release Notes
_ __ _ _ __
_ __ ___| |_ _ __ ___ / _| ___ _ __| |_| |__ / / __ __ _ __ _
| '__/ _ \ __| '__/ _ \| |_ / _ \| '__| __| '_ \ / / '_ \ / _` |/ _` |
| | | __/ |_| | | (_) | _| (_) | | | |_| | | |/ /| | | | (_| | (_| |
|_| \___|\__|_| \___/|_| \___/|_| \__|_| |_/_/ |_| |_|\__, |\__,_|
|___/
# RetroForth 2023.1 Release Notes
----------------------------------------------------------------
# Major Changes
* added malloc device (Rick Carlino)
* added limited double: vocabulary (Rick Carlino)
* added ffi device
* in c implementation, state now tracked in a struct instead
of global variables
* fixed compile time warning about missing code blocks
* added a BUILD constant
* fixed bugs in retro-describe(1)
* fixed glossary html export
* added block: vocabulary
* new example: port of retroforth/ilo block editor
* corrected filename reference in documentation (reported by
Martin Hohmann-Marriott)
* addded tail-recurse
* added missing glossary entries
* started work on adding name hashes to dictionary
----------------------------------------------------------------
# Other
* addded new words:
- n:add
- n:sub
- n:mul
- n:div
- n:divmod
- n:mod
- d:hash
- d:rehash
- d:Hash-Function
* added a port of retroforth/ilo block editor
* no longer display warning on files with only test blocks (#87)
----------------------------------------------------------------

View file

@ -10,8 +10,8 @@
#define CELL_MAX LLONG_MAX - 1
#endif
#endif
CELL ngaImageCells = 19033;
CELL ngaImage[] = { 1793,18540,18988,19032,202301,410,382,1242,1535,0,10,1,10,2,10,3,10,4,10,
CELL ngaImageCells = 20404;
CELL ngaImage[] = { 1793,18540,20359,20403,202301,410,382,1242,1535,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,161,178,268505089,63,62,285281281,0,63,2063,10,101384453,0,9,10,68485378,255,18350338,
@ -20,7 +20,7 @@ CELL ngaImage[] = { 1793,18540,18988,19032,202301,410,382,1242,1535,0,10,1,10,2,
101777669,1,17565186,107,524545,111,64,167838467,-1,134287105,3,59,659457,3,459023,128,2049,56,25,2049,
128,1793,135,2049,135,117506307,0,128,0,524545,26,133,168820993,0,147,1642241,147,134283523,11,133,
1793,128,524545,2049,128,1793,128,16846593,147,161,178,1793,64,16846593,147,133,178,1793,64,7,
10,659713,1,659713,2,659713,3,659713,4,659713,5,1793,18795,17108737,3,2,524559,128,2049,128,
10,659713,1,659713,2,659713,3,659713,4,659713,5,1793,20166,17108737,3,2,524559,128,2049,128,
2049,128,524545,0,128,524545,0,128,2049,142,168820998,2,17776,1242,167841793,211,9,17826049,0,211,
2,15,25,524546,188,134287105,212,116,2305,213,459023,221,134287361,212,216,659201,211,10,659969,7,
2049,56,25,17694978,58,237,9,84152833,48,319750404,236,117507601,239,184618754,45,25,16974851,-1,168886532,1,
@ -170,7 +170,7 @@ CELL ngaImage[] = { 1793,18540,18988,19032,202301,410,382,1242,1535,0,10,1,10,2,
110,58,105,110,99,0,659713,1,10,3114,3139,166,16136,266800217,110,58,100,101,99,0,
659969,1,10,3128,3158,166,16136,1032861494,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,166,16136,-2130983749,83,99,
111,112,101,76,105,115,116,0,18890,18944,10,3172,3198,166,16136,5864091,123,123,0,2049,
111,112,101,76,105,115,116,0,20261,20315,10,3172,3198,166,16136,5864091,123,123,0,2049,
1576,2,1,3187,2049,59,16,10,3190,3225,166,16136,-1644352334,45,45,45,114,101,118,101,
97,108,45,45,45,0,2049,1576,1,3187,2049,3125,16,10,3207,3241,166,16136,5864159,125,
125,0,1,3187,2049,56,4,15,11,1793,3255,3841,3187,4097,2,10,1,3250,1793,3281,
@ -228,7 +228,7 @@ CELL ngaImage[] = { 1793,18540,18988,19032,202301,410,382,1242,1535,0,10,1,10,2,
10,4239,4297,154,16136,1204567429,84,101,109,112,83,116,114,105,110,103,115,0,32,4280,
4317,154,16136,1808866840,84,101,109,112,83,116,114,105,110,103,77,97,120,0,512,4298,
4331,166,16136,-1027089649,83,84,82,73,78,71,83,0,2049,1545,3841,4297,3841,4317,19,18,
10,4318,4353,154,0,0,67,117,114,114,101,110,116,0,16,10,4340,4370,166,0,
10,4318,4353,154,0,0,67,117,114,114,101,110,116,0,6,10,4340,4370,166,0,
0,115,58,112,111,105,110,116,101,114,0,3841,4353,3841,4317,19,2049,4331,17,10,
4355,4391,166,0,0,115,58,110,101,120,116,0,1,4353,2049,3864,3841,4353,3841,4297,
11,1793,4407,1,0,4097,4353,10,1,4402,9,10,4318,4423,166,16136,410724968,115,58,116,
@ -941,7 +941,7 @@ CELL ngaImage[] = { 1793,18540,18988,19032,202301,410,382,1242,1535,0,10,1,10,2,
0,3841,17996,1793,18547,2049,18454,10,1,18544,2049,72,2049,18380,2049,18398,1,18551,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,18528,18599,154,0,0,83,111,117,114,99,101,115,0,
1,18838,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,18838,19032,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,
@ -962,4 +962,73 @@ CELL ngaImage[] = { 1793,18540,18988,19032,202301,410,382,1242,1535,0,10,1,10,2,
45,108,101,102,116,0,2,2049,1977,2049,5519,1793,18977,2049,10761,2049,10731,10,1,18972,
1793,18983,3,10,1,18981,2049,64,10,18890,19016,166,18838,-1159574567,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,19027,2049,188,2049,18965,10,1,19022,2049,8491,10,0 };
5573,1793,19027,2049,188,2049,18965,10,1,19022,2049,8491,10,108,105,115,116,46,102,111,
114,116,104,0,18988,19056,154,19032,72570505,83,111,117,114,99,101,115,0,2,19295,19489,
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,19043,19196,166,19032,159149617,107,110,111,119,110,63,0,2,1,19056,
2049,9003,10,19184,19213,166,19032,262739357,105,110,100,101,120,0,1,19056,4,2049,9320,1,
19056,4,2049,9140,10,19202,19236,166,19032,421984292,114,101,99,111,114,100,0,2049,4500,2,
1,19056,2049,3864,3841,19056,1,19056,17,16,10,1793,19293,2049,15559,2049,19196,1793,19261,2049,
19213,10,1,19258,1793,19268,2049,19236,10,1,19265,2049,64,1793,19281,1,190,1,2,17,
8,10,1,19274,2049,2229,2049,1576,2049,184,16,2049,11116,10,1,19252,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,18988,19333,166,19295,-1519205998,100,58,119,111,114,100,115,0,1793,19342,2049,188,2049,10761,
2049,10731,10,1,19335,2049,8491,10,19320,19365,166,19295,1750461083,100,58,119,111,114,100,115,
45,119,105,116,104,0,2049,1977,2049,5573,1793,19396,2049,188,2,2049,1977,2049,5286,1793,
19385,2049,10761,2049,10731,10,1,19380,1793,19391,3,10,1,19389,2049,64,10,1,19371,2049,
8491,10,19347,19422,166,19295,-1509196721,100,105,115,112,108,97,121,45,105,102,45,108,101,
102,116,0,2,2049,1977,2049,5519,1793,19434,2049,10761,2049,10731,10,1,19429,1793,19440,3,
10,1,19438,2049,64,10,19347,19473,166,19295,-1159574567,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,19484,
2049,188,2049,19422,10,1,19479,2049,8491,10,108,105,115,116,46,102,111,114,116,104,
0,19445,19513,154,19489,72570505,83,111,117,114,99,101,115,0,2,19752,19946,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,19500,19653,166,19489,159149617,107,110,111,119,110,63,0,2,1,19513,2049,9003,10,
19641,19670,166,19489,262739357,105,110,100,101,120,0,1,19513,4,2049,9320,1,19513,4,2049,
9140,10,19659,19693,166,19489,421984292,114,101,99,111,114,100,0,2049,4500,2,1,19513,2049,
3864,3841,19513,1,19513,17,16,10,1793,19750,2049,15559,2049,19653,1793,19718,2049,19670,10,1,
19715,1793,19725,2049,19693,10,1,19722,2049,64,1793,19738,1,190,1,2,17,8,10,1,
19731,2049,2229,2049,1576,2049,184,16,2049,11116,10,1,19709,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,19445,19790,
166,19752,-1519205998,100,58,119,111,114,100,115,0,1793,19799,2049,188,2049,10761,2049,10731,10,
1,19792,2049,8491,10,19777,19822,166,19752,1750461083,100,58,119,111,114,100,115,45,119,105,
116,104,0,2049,1977,2049,5573,1793,19853,2049,188,2,2049,1977,2049,5286,1793,19842,2049,10761,
2049,10731,10,1,19837,1793,19848,3,10,1,19846,2049,64,10,1,19828,2049,8491,10,19804,
19879,166,19752,-1509196721,100,105,115,112,108,97,121,45,105,102,45,108,101,102,116,0,
2,2049,1977,2049,5519,1793,19891,2049,10761,2049,10731,10,1,19886,1793,19897,3,10,1,19895,
2049,64,10,19804,19930,166,19752,-1159574567,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,19941,2049,188,2049,
19879,10,1,19936,2049,8491,10,108,105,115,116,46,102,111,114,116,104,0,19902,19970,
154,19946,72570505,83,111,117,114,99,101,115,0,1,20209,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,19957,
20110,166,19946,159149617,107,110,111,119,110,63,0,2,1,19970,2049,9003,10,20098,20127,166,
19946,262739357,105,110,100,101,120,0,1,19970,4,2049,9320,1,19970,4,2049,9140,10,20116,
20150,166,19946,421984292,114,101,99,111,114,100,0,2049,4500,2,1,19970,2049,3864,3841,19970,
1,19970,17,16,10,1793,20207,2049,15559,2049,20110,1793,20175,2049,20127,10,1,20172,1793,20182,
2049,20150,10,1,20179,2049,64,1793,20195,1,190,1,2,17,8,10,1,20188,2049,2229,
2049,1576,2049,184,16,2049,11116,10,1,20166,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,19902,20247,166,20209,-1519205998,
100,58,119,111,114,100,115,0,1793,20256,2049,188,2049,10761,2049,10731,10,1,20249,2049,
8491,10,20234,20279,166,20209,1750461083,100,58,119,111,114,100,115,45,119,105,116,104,0,
2049,1977,2049,5573,1793,20310,2049,188,2,2049,1977,2049,5286,1793,20299,2049,10761,2049,10731,10,
1,20294,1793,20305,3,10,1,20303,2049,64,10,1,20285,2049,8491,10,20261,20336,166,20209,
-1509196721,100,105,115,112,108,97,121,45,105,102,45,108,101,102,116,0,2,2049,1977,
2049,5519,1793,20348,2049,10761,2049,10731,10,1,20343,1793,20354,3,10,1,20352,2049,64,10,
20261,20387,166,20209,-1159574567,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,20398,2049,188,2049,20336,10,1,
20393,2049,8491,10,0 };

View file

@ -1694,6 +1694,9 @@ int fence_boundary(NgaState *vm, char *buffer, int tests_enabled) {
int flag = 1;
if (strcmp(buffer, vm->code_start) == 0) { flag = -1; }
if (strcmp(buffer, vm->code_end) == 0) { flag = -1; }
if (strcmp(buffer, vm->test_start) == 0) {
if (vm->codeBlocks == 0) { vm->codeBlocks++; }
}
if (tests_enabled == 0) { return flag; }
if (strcmp(buffer, vm->test_start) == 0) { flag = -1; }
if (strcmp(buffer, vm->test_end) == 0) { flag = -1; }
@ -1806,7 +1809,7 @@ void include_file(NgaState *vm, char *fname, int run_tests) {
vm->cpu[vm->active].ip = aip;
if (vm->codeBlocks == 0) {
printf("warning: no code blocks found!\n");
printf("warning: no code or test blocks found!\n");
printf(" filename: %s\n", fname);
printf(" see http://unu.retroforth.org for a brief summary of\n");
printf(" the unu code format used by retro\n");