Menu

SVN-Code Commit Log


Commit Date  
[r13040] by mikeaubury

UI protocol: normalise remaining field names; .NET MENU support

Two more lowercase field names missed by r13038, both found by checking
the uilib layer rather than only json.c/xml.c: a second OPTIONS emitter
in ui_json/uilib/uilib.c, and CLEAR's todefault. All emitters now use
one casing for scalar fields; TitleCase names like Fields and
MenuCommands are nested payloads and are left as they are.

.NET: MENU over the wire, checked against what the C runtime actually
emits rather than against the source - which corrected three things.
The objects nested in MenuCommands carry no "type" field, their ids are
1-based, and they include KEYS and HELPNO. That needed a UiPayload /
UiMessage split, since only top-level messages carry a verb.

Menu commands are identified by a caller-supplied enum, so generated
dispatch reads as "case MainMenu.Customer" rather than the old
"case 0: /* COMMAND */".

2026-09-02 06:28:32 Tree
[r13039] by mikeaubury

.NET: reference program pinning what the generator should emit

dotnet/examples/ pairs a 4GL program with the C# the generator should
produce for it, hand-written so the target shape is settled before the
generator is pointed at it. It covers the cases the 2012 output got
wrong: MONEY (which emitted "unknown_8"), CHAR padding, a NULL that has
to survive the round trip, a cursor loop, and NOTFOUND as a status
rather than an error.

End-to-end tests run it against SQLite with a recording UI channel, a
JSON channel, and no channel at all - proving a generated program needs
neither a screen nor Informix to run or be tested. The session now
carries the UI channel alongside SQL and status.

2026-09-02 06:15:07 Tree
[r13038] by mikeaubury

Maths builtins, CHAR UTF-8 truncation, UI protocol names, .NET runtime

ROUND/TRUNC/MOD/POW/EXP/LOGN/LOG10 were "not implemented" stubs and
failed to link. Implemented in builtin_d.c. ROUND and TRUNC work on the
decimal text rather than the double, so ROUND(1.005,2) gives 1.01 and
agrees with LET onto a DECIMAL(10,2); rounding the double gave 1.00.
Not added to std_funcs.c - that would reserve the names and break
programs defining their own, as tools/misql/coxxc04.4gl does.

CHAR(n) truncation could cut a UTF-8 character in half and leave invalid
bytes in the field. A4GL_trim_partial_char blanks a partial trailing
character; the field keeps its width and ASCII is unaffected.

UI protocol field names made consistent: MOVEWINDOW sent x/y, OPTIONS
sent option/value and WAITFOREVENT sent context, against uppercase
everywhere else. MOVEWINDOW was also emitting a malformed tag on both
XML paths (a stray / mid-tag). The Angular OPTIONS handler now accepts
the old and new names, so it works against either runtime.

dotnet/: .NET 8 runtime - 4GL types (CHAR/NCHAR as one character-counted
type, decimal for DECIMAL and MONEY, DateOnly for DATE, qualified
DATETIME and INTERVAL), SQL over a pluggable driver chosen by
A4GL_SQLTYPE with no provider dependency in the core, and the UI
protocol channel. 71 tests, plus a harness that runs the same probe
through both runtimes and diffs them.

Also adds 24 ExtJS command handlers that were never committed.

2026-09-02 06:12:44 Tree
[r13037] by mikeaubury

Restore the install file lists, so `make install` installs something.

The rewrite replaced a dozen lists that the old configure.in computed with
AC_SUBST(..., []) stubs. Every one of them feeds a
cp $(addprefix $(SOMEWHERE_DIR)/, $(SOMETHING_FILES)) $(DEST)
so an empty list became "cp <destination>" with no source, and the install
died at the first one. Worse, the executable lists were among them, so
even after getting past that nothing in bin was ever copied - an install
tree kept serving whatever binaries it already had, however many times the
source was rebuilt.

Restored, from what the old configure.in did:

FGLPC_SETTINGS_FILES listed from tools/4glpc/settings
ETC_FILES IMPORT_FILES CONVSQL_FILES listed from their directories
ROOT_FILES ALL_INC ALL_DOC explicit lists, existence filtered
ALL_SH AMAKE_SH AMAKE_BIN_EXE COMP_EXE RUNTIME_EXE the programs

AUBITETC was also being substituted as the literal '${prefix}/etc/aubit4gl'.
Makefile-common defines no 'prefix', so it collapsed to /etc/aubit4gl -
root owned, and the install failed for anyone not installing as root. It is
now expanded at configure time.

And the default prefix gets its writability check back: the old
configure.in fell back to a prefix under $HOME when /opt was not writable,
which the rewrite had dropped. An explicit --prefix is still honoured
exactly as given.

`make install` now completes and installs the programs.

2026-09-01 17:32:27 Tree
[r13036] by mikeaubury

An "object function" is no longer part of a class's dispatch table.

The grammar already marks these E_FTYPE_OBJECT and turns class lookup off
for them, but the code generator published every method the same way, so
a subclass's "object function sub" shadowed an inherited "function sub"
for ordinary instance calls. class.c now skips E_FTYPE_OBJECT in both
places it emits methods - memberFunctions[] and the
A4GL_add_datatype_function_i registrations - which leaves object
functions distinct from plain ones rather than a synonym for them.

Test 1818 passes. Suite: 1098 run, 23 failed, against 29 before today.

2026-09-01 17:32:07 Tree
[r13035] by mikeaubury

Fix negative DATETIME subtraction losing its magnitude.

Subtracting datetimes computed each field from the signed total, so a
negative difference gave every component its own minus sign:

seconds = -95703 -> "-1 -02:-35:-3"

which does not parse back, so the interval came out as zero with the sign
still attached - "-0 00:00" where "-1 02:35" was wanted. The positive
direction was always correct, which is why this went unnoticed.

Now the magnitude is split and a single leading sign applied. Test 1635
passes.

2026-09-01 17:11:08 Tree
[r13034] by mikeaubury

Fix tests 671, 672 and 673 - two defects in the tests themselves.

DATETIME FRACTION TO FRACTION is a degenerate qualifier and binding an
uninitialised one fails conversion, which aborted all three programs long
before they tested anything interesting. Removed those two fields; SECOND
TO SECOND and SECOND TO FRACTION are kept.

673 then failed with -217 on a second, older defect that the first had
been masking: its record field names and its CREATE TABLE column names had
drifted apart, and the explicit UPDATE/SELECT column lists used the record
spelling. Every name that differs is one the CREATE had shortened to fit
an 18 character identifier limit - aCharacterWithSize became
aCharacterWithSz, aIntervalMinPrecMin became aIntervalMinPreM, and so on -
so the lists asked for columns the table does not have. Corrected the 14
column-list entries; record definitions and r_. references are untouched.

All three now pass. Found with the debug trace restored in r13033.

2026-09-01 17:02:44 Tree
[r13033] by mikeaubury

Restore debug tracing, and make it the default again.

The runtime's tracing all sits inside #ifdef DEBUG, and nothing has been
defining DEBUG since the configure rewrite, so DEBUG=ALL has silently
produced nothing at all.

Three things were wrong. configure defaulted debug off, where the old
configure.in had it on unless --enable-optimised was given. --enable-debug
only added -g -O0 and never defined DEBUG, so the option did not work
either. And Makefile-common resets CFLAGS, so the flag cannot travel that
way - the template already had the right hook, DDEBUG=@DBGFLAG@, but
DBGFLAG was never substituted.

Now on by default, --enable-optimised to opt out. A run of test 671 that
previously gave no diagnostic at all now writes 450K of trace and names
the failing bind directly.

2026-09-01 16:55:09 Tree
[r13032] by mikeaubury

Mark the eight broken/invalid tests as expected failures.

484 491 527 674 contain no .4gl and no .expected at all - the directories
are empty, so there is nothing to run. 545 546 547 548 are CREATE/DROP
DATABASE tests whose own descriptions say the test is invalid.

All eight already declare obsolete_test=1, and functions_inc.sh has a skip
for that (IS_OBSOLETE_TEST), but it never fires - runs still report
Skipped: 0 and count them as failures. Listing them here uses the
mechanism that works; they can come back out if the skip is ever fixed.

Takes the unexpected-failure count from 18 to 10.

2026-09-01 13:29:59 Tree
[r13031] by mikeaubury

Test 1705 (ansi outer join) passes - drop it from the expected-to-fail lists.

Verified under -esqli -tui. It was listed in both the shared list and the
esqli one, and the shared list is unioned into every configuration, so it
had to come out of both.

2026-09-01 09:51:45 Tree
Older >