davidrg / ckwin

Kermit 95 (C-Kermit for Windows) - scriptable internet and serial communications with terminal emulation
Other
60 stars 15 forks source link

Exclude Console API code from K95G #301

Open davidrg opened 2 weeks ago

davidrg commented 2 weeks ago

K95G.EXE (the GUI version of K95) still includes a reasonable chunk of code for updating a text-mode console window as used by K95.EXE.

Most of this code is never called so all its doing is bloating the executable size (and probably memory use). But surprisingly _ some of it is actually still called. I can't imagine any of it is actually doing anything useful in the absence of a console window to work with and I suspect in most cases calling this code is unintentional. Just things missed in the port to a GUI.

In some cases I've just removed the calls, in other cases I've replaced the calls with what should be called, like replacing GetCurPos with VscrnGetCurPos as is done elsewhere where ONETERMUPD is defined.

The result seems ok, but its possible this could introduce subtle bugs. Testing required.