Menu ▾ ▴

SVN-Code Commit Log


Commit Date  
[r13128] by mikeaubury

VS Code debugger: 4GL-aware variable display

The proxy reads each variable's declared 4GL type from the DEFINE: DATE is shown as a date,
DECIMAL/MONEY as a number (via A4GL_dec_to_str evaluated by gdb), and the 4GL type is the
variable's type on hover.

2026-10-04 14:01:52 Tree
[r13127] by mikeaubury

VS Code extension: form preview (webview from fcompile -json)

Aubit 4GL: Preview Form renders the .per beside the editor, live, with field attributes in tooltips
and click-to-definition. Tests: unit, real fcompile, mocked API and inside a real VS Code.

2026-10-04 13:58:34 Tree
[r13126] by mikeaubury

Syntax errors say what was expected; clean-export fix for the NULL/WRITE lextype plug-ins

- A4GL_EXPECTED_TOKENS=Y adds ' - expected: ...' to syntax errors, built from the parser state
(lexer.c A4GL_expected_tokens_text, compile.c). Opt-in; documented in docs/completion_support.txt.
- lib/Makefile: 4glc now depends on libLEX_NULL and libLEX_WRITE. A clean svn export did not build
libLEX_NULL.so because the committed configure predates it in m4/aubit_lists.m4.
- VS Code extension: syntax-error text, quick fixes (define variable, remove unused variable,
LINT IGNORE), real-VS-Code test for the quick fix; roadmap updated.

2026-10-04 13:55:14 Tree
[r13125] by mikeaubury

VS Code extension for 4GL development (vscode/aubit4gl)

Highlighting generated from the compiler's keyword lists; diagnostics from the compiler
run in place (NULL lextype); outline, definition, hover, signature help, references,
rename (including GLOBALS files); completion of variables, record fields, like-table
columns (from the compiler), SQL tables/columns/DDL, form fields and keywords valid at the
cursor (from the parser state); fgllint diagnostics; a debugger (gdb's DAP server behind a
4GL-aware proxy, using #line directives). Tests: node --test (unit and real compiler) and
npm run test:vscode (inside a real VS Code). Roadmap in TODO.md.

2026-10-04 13:51:08 Tree
[r13124] by mikeaubury

Web UI: authentication, session resume, field attributes, option lines, tests

Angular/UI_JSON work tracked in node/WEBUI_TASKS.md: one-time start tokens, session resume,
connection banner, busy indicator, field attributes (UPSHIFT, PICTURE, DEFAULT, REQUIRED,
INCLUDE, FORMAT), OPTIONS lines, DISPLAY ARRAY windowing, accessibility basics, ON KEY.
Driver fix: uilib_error never popped the attribute. npm test / npm run test:db and the
browser e2e scenarios, test programs under node/baseProgs.

2026-10-04 13:50:48 Tree
[r13123] by mikeaubury

adbschema: -json output and complete type names

-json writes the schema as JSON (docs/adbschema_json.txt). Added SERIAL8, LVARCHAR(n),
BOOLEAN, BIGSERIAL and nested SET/MULTISET/LIST/ROW (read from sysattrtypes). An unknown
type is written as UNKNOWN_TYPE_<n> and the dump continues, where it used to exit.
tools/adbschema/test-types.sh checks the types against a live database.

2026-10-04 13:50:35 Tree
[r13122] by mikeaubury

REST/JSON services callable from 4GL

rest_register / run_rest_server in libaubit4gl (registration from a JSON file found via
DBPATH, DLL loaded with dlopen), a Node gateway with a worker pool, OpenAPI generation
and tests under tools/rest. See docs/rest_services.txt.

2026-10-04 13:50:31 Tree
[r13121] by mikeaubury

Compiler: completion hooks, #line fixes, NULL lextype, fgllint in default build

- 4glc and fcompile can report which tokens the parser accepts at end of input
(A4GL_COMPLETE_FILE, see docs/completion_support.txt); fcompile spellings come from
complete_spell.h, generated from screen.lex by gen_complete_spell.sh.
- INCLINES (#line directives) never worked for programs without GLOBALS:
print_global_variable_init left suppress_lines raised. Also repeat the current #line
before continuation lines when merging the C file, so a multi-line declaration is not
attributed to later 4GL lines (debuggers put breakpoints in the prologue otherwise).
- LEX_NULL lextype (parse and check, write nothing) and A4GL_ERRFILE=- (errors to stdout):
docs/check_only_compile.txt.
- fglproto: terminate buffers, comma fix in the JS emitter.
- bin/fgllint is built by the default make in compilers/4glc.
- Move two prototypes into a4gl_incl_4gldef.h (generated code failed with implicit
declarations).

2026-10-04 13:50:20 Tree
[r13120] by mikeaubury

odbc: sqlex.c and array.c still passed 32 bit length indicators

r13115 fixed the SQLLEN mismatches in sql.c, but the plugin is built from
four files and two more had the same fault, declared with SDWORD rather than
through the SQLLEN fallback:

sqlex.c A4GL_odbc_get_blob_data_int SDWORD i -> SQLGetData arg 6
array.c static SDWORD outlen[512] -> SQLBindCol arg 6

SDWORD is 4 bytes on LP64 while those parameters are SQLLEN *, 8 bytes, so the
driver writes 8 bytes into a 4 byte object - a warning before gcc 14 and an
error since. The unixODBC build stopped on the first of them:

sqlex.c:780:70: error: passing argument 6 of 'SQLGetData' from incompatible
pointer type [-Wincompatible-pointer-types]

and array.c would have followed with three more at SQLBindCol. Both are now
SQLLEN, which the bundled-header SQLITEODBC build still gets from the fallback
in a4gl_lib_sql_odbc_int.h. Every use of either variable is a comparison,
sum or size argument, all of which read the same with the wider type.

Checked against the unixODBC 2.3.12 headers (unixodbc-dev, Ubuntu 24.04):
before this change sqlex.c gives exactly the reported error and array.c the
three that would follow; after it all four files compile, and the unixodbc
make target builds libSQL_unixodbc.so with the Makefile's own flags. Also
clean against the Informix CLI headers (IFXODBC, 64 bit SQLLEN) and the
bundled tools/odbctest/incl set (SQLITEODBC, no SQLLEN at all). No other
SDWORD or SQLINTEGER in the plugin is passed where ODBC wants an SQLLEN.

2026-09-24 16:00:35 Tree
[r13119] by mikeaubury

OPEN FORM: pass the FORM variable's member, not the struct

A FORM variable is generated as

static struct { long objectid ; } list;

and OPEN FORM emitted A4GL_open_gui_form(&list,...) against a parameter
declared long* (API_ui.spec). That only worked because objectid happens to be
the single member and so shares the struct's address; to the C compiler it is
a type error, and one that gcc 14 refuses:

error: passing argument 1 of 'A4GL_open_gui_form' from incompatible pointer
type; expected 'long int *' but argument is of type 'struct <anonymous> *'

so tools/test/gui/calc.4gl could not be compiled. The member is now passed
explicitly - &list.objectid - which is the same address, so nothing changes at
runtime and the plugin API is left alone. The backends do write through that
pointer (*form_variable = (long)tlw in ui_glade), so long* is the right type
for it to keep.

While there: the name emitted here comes from the command as a plain
identifier rather than a variable usage, so it was not going through the scope
prefixing that r13117 added - under MARK_SCOPE the form was declared M_list and
opened as list. It is now looked up by name to find its scope, the same way the
CODE block aliases do, so declaration and use agree again. This could not have
shown up before, as the statement did not compile either way.

defprog.4gl calls time() in a CODE block without including <time.h>; it does
now, as clock.4gl does for usleep() since r13116.

Checked on the 142-module corpus: 112 compile where 110 did, the two being
calc.4gl and defprog.4gl, with nothing that compiled before failing now, and
the results identical with MARK_SCOPE and MARK_SCOPE_MODULE set.

2026-09-21 11:14:47 Tree
Older >