This will let the app set up some state about the OS/2 "system", like what
Unix paths are mapped to which OS/2 drive letters, system vars, etc.
This reads from /etc/2ine.cfg, and then tries a copy in the user's local
config dir to add/override settings.
This mostly doesn't do anything yet, but the framework is there for adding
stuff, and the drive letter mapping is done, even if nothing is using it.
This lets me remove my tcpip32 hack, and will let me export old symbols
as all caps for OS/2's use and something more sane for regular use
(like VioGetCurPos() in modern times is VIOGETCURPOS in viocalls.dll, etc).
This is read/write memory owned by the process, which can reallocate it,
which CMD.EXE does.
(FIXME comment by ryan, rest of the patch was from cracyc.)
This currently only works with a simple Hello World program, but this is the
bulk of the work to 16-bit program support.
Still need some minor effort to get 16-bit DLLs working, and of course we
need to implement a ton of missing 16-bit API calls.
Although strictly speaking, it looks like the final OS/2 releases
will fail if the OS/2 .EXE is less than ~320 bytes, choosing to
launch it as a DOS program instead (giving you the "This is an
OS/2 executable" message from the DOS stub, comically).
This, with its fairly large (but incomplete) dictionary of system APIs, is
useful when you want to know that a module wants "VioWrtNCell" and not
"ordinal 52 in VIOCALLS.DLL". :)
This is just lx_dump for now, but if some work proves out, we can load these
with lx_loader, too, and bridge the 16-bit APIs to 32-bits the same as we
do anyhow, giving us access to 16-bit OS/2 binaries.
Obviously, this disables lx_loader, but you can compile a C program that
uses OS/2 APIs as a native 64-bit Linux app and run them.
So now we can do 2ine and 2inelib. :)
GLoaderState is moved to a new lib2ine library, which everything links
to and sets up what it can in a DLL constructor, so your app can just
link to doscalls or whatever and it'll have what it needs without
something like lx_loader doing a lot of heavy lifting before your
main() runs.