This way, we only include that code if its commands are called upon.
In order to do this, some other areas had to be changed as well:
- There is now a libqb.h file, which declares some routines in libqb.cpp,
in order to allow them to be called from a separately compiled unit, i.e,
the user mods part.
- common.cpp now has an #include guard, just to be on the safe side.
- The library purge routines know about the new part.
- qb64.bas is modified to handle the new part; this area is just modeled
off the code for the other parts.
- Appropriate flags were set in the hash table entires for the commands.
- The user mods, now being a separate compilation unit, #include common.cpp
and libqb.h. The former is required for important type declarations and
access to glut commmands, the latter for access to libqb routines.
- qbx.cpp #includes the src.cpp file in the user mods part, which declares the
routines.
Something to ponder: libqb does not include or rely on any of the user mod routines,
so it's probably not necessary to rebuild it like with the other parts. That exploration
is for another day, however.
Without a parameter, it clears all buffers. A numeric parameter will
clear only a specific buffer: 1 = INKEY$ buffer (and other traditional
QB input commands), 2 = _KEYHIT buffer, 3 = INP(&H60) buffer. The last
one is not actually cleared, but we pretend we've read all the data from
it.
To ensure no stray characters, use this command immediately before the
code you wish to sanitise. You never know when the user might bang on
the keyboard, and this also helps to avoid stray key release values
persisting in the _KEYHIT buffer.
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.