'+---------------+---------------------------------------------------+
'| ###### ###### |     .--. .         .-.                            |
'| ##  ## ##   # |     |   )|        (   ) o                         |
'| ##  ##  ##    |     |--' |--. .-.  `-.  .  .-...--.--. .-.        |
'| ######   ##   |     |  \ |  |(   )(   ) | (   ||  |  |(   )       |
'| ##      ##    |     '   `'  `-`-'  `---' `-`-`|'  '  `-`-'`-      |
'| ##     ##   # |                            ._.'                   |
'| ##     ###### |  Sources & Documents placed in the Public Domain. |
'+---------------+---------------------------------------------------+
'|                                                                   |
'| === QB64Library-Info.html ===                                     |
'|                                                                   |
'| == Some general notes about my small QB64 libraries collection.   |
'|                                                                   |
'+-------------------------------------------------------------------+
'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |
'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |
'| any questions or suggestions. Thanx for your interest in my work. |
'+-------------------------------------------------------------------+

IMPORTANT

Please move the QB64Library folder with its entire contents into your QB64 folder (where qb64.exe is located in). I also recommend to keep the inner folder structure as is, then everything should work as intended. When you later $INCLUDE a library into your program, then simply specify the respective .bi and/or .bm files with a relative path, assuming the QB64 folder as root directory (see programs in the example subfolders).

If you would rather like to implement the files into your own library folder structure or if you simply want to distribute a library as standalone file(s) along with your program code, then make sure to adjust the paths/filenames accordingly, so that every file can be properly located. In case of C-Header based libraries don't forget to adjust the paths/filenames in the #include directives in any .h files and at the DECLARE LIBRARY statements in the respective .bi files

Note, that I wrote all this stuff using QB64 v0.954 (SDL) on a Windows system and never tested it on Linux or MacOS, also newer QB64 versions were only tested minimally on Windows. Nevertheless I'm pretty sure it will work in other environments and newer QB64 versions too, as it is straight forward code which does use standard library functions here and there, but no platform specific API calls. Especially I've tested all libraries to make them work with both, either with or without OPTION _EXPLICIT in effect, without throwing any IDE warnings anymore.

Unless other noted, all libraries in my collection are unlicensed and placed in the Public Domain, see the license folder in each library.

The syntax, arguments and results of all SUBs and/or FUNCTIONs are available as HTML documents in the respective docs subfolders. Following is just a short overview of all libraries in the collection.

 

 

 

Screen & Image Support (QB64Library/IMG-Support)


Coordinate & Color converter (converthelper.bm) ---> Read Docs

Routines to move or rotate points or convert between cartesian and polar coordinate systems. Also some more routines to convert colors between the HSB/HSV and RGB colorspace models.

Image processing effects & filters (imageprocess.bm) ---> Read Docs

Image processing routines for easy manipulation of true color (32-bit ARGB) images. There are common functions like brightness, contrast and gamma correction, but also some special functions for various effects and filtering.


 

 

 

DRF Polygon Support (QB64Library/DRF-Polygons)


Polygon mathematics (polygons.bm) ---> Read Docs

Some useful functions for Polygon handling and analysis inclusive drawing/filling support. Based on the Geometry/Math examples described by Darel Rex Finley (DRF) on his web site http://alienryderflex.com/tutorials.shtml.


 

 

 

Stringbuffer Data Storage (QB64Library/SB-Storage)


Stringbuffer storage system (stringbuffer.bi/.bm) ---> Read Docs

You may use it for simple file buffering or as general purpose storage. You can read and write data, search data (fwd/rev), copy & paste data blocks and use bookmarks. The buffer system supports Windows as well as Linux/MacOSX line endings and can convert one to the other.


 

 

 

Adaptive LZW packing (QB64Library/LZW-Compress)


Packing & Unpacking (lzwpacker.bm) ---> Read Docs

This library provides functions to pack and unpack data using an adaptive LZW algorithm. Note that this library is not an interface to other well known packing/archive formats like .zip/.7z/.gz etc., but provides the LZW algorithm in its own library context only.


 

 

 

DES-56bit En-/Decryption (QB64Library/DES56-Crypt)


Encryption & Decryption (des56.h/.bi/.bm) ---> Read Docs

Functions to make passwords for .htaccess based Web-Site protection, and en-/decryption of whole files. This library is based on sources found in the Internet and the DES56 algorithm is under the license GNU GPL v2, see subfolder DES56-Crypt\license.


 

 

 

MD5 Message-Digest (QB64Library/MD5-Hash)


MD5 functions wrapper (md5.h/.bi/.bm) ---> Read Docs

Build the MD5 Message-Digest from any file or string. This library is based on the MD5 sources from Notepad++. The MD5 Message-Digest algorithm is under the direct license of RSA Data Security, Inc., see subfolder MD5-Hash\license.


 

 

 

SHA2 Message-Digest (QB64Library/SHA2-Hash)


SHA2 functions wrapper (sha2.h/.bi/.bm) ---> Read Docs

Build the SHA2 Message-Digest from any file or string. This library is based on the SHA2 sources from Notepad++. SHA2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and patented in US patent 6829355. The United States has released the patent under a royalty-free license, see subfolder SHA2-Hash\license.


 

 

 

Standard Library (QB64Library/QB-StdLibs)


Did you ever regret, that you can't use escape sequences in strings to insert special characters or inserting quotes without the bulky need to use a "string" + CHR$(34) + "string" notation? Or did you never feel happy with the formatting tokens PRINT USING provides? If so, then these library files will help you out, they provide the standard C/C++ functions for formatted output and the required variable argument lists (va_list) in some QB64 friendly functions.

C/C++ like variable argument lists (qbstdarg.h/.bi/.bm) ---> Read Docs

Within these files you find definitions and functions to setup variable argument lists (va_list) as needed by many C/C++ functions. The va_list will be emulated within a regular QB64 string.

C/C++ like stdio functions for formatted output (qbstdio.h/.bi/.bm) ---> Read Docs

This is a good alternative for PRINT USING, you may use formatting strings with most of the formatting tokens known to the C/C++ function printf() inclusive the valid escape sequences and octal or hex escaped characters.

C/C++ like date/time formatting functions (qbtime.h/.bi/.bm) ---> Read Docs

What the above is doing for regular strings and numbers, this will do the same for date/time values. You may use formatting strings with many of the formatting tokens known to the C/C++ function strftime() and the usual escape sequences are also available.

Several size and padding conventions must be followed between x32 and x64 versions. There's a StdLibs-Test.bas in the example subfolder, which you should try first to make sure everything is working as intended on your system. The output should match the StdLibs-Test.png screenshot.


 

 

 

Debugging/Logging (QB64Library/QB-Debug)


During program development it is often required to have an idea of what's going on during runtime to figure out any misbehavior. Of course, you could simply use the PRINT(USING) statement(s) to output the required information, but the advantage of this debug logging system is, that it can be used on the QB64 language level as well as on C/C++ language level in any .h header files included via the DECLARE LIBRARY statement. All output is written to the named logfile and will be formatted according to the nesting level of function calls.

QB64/C/C++ debug logging system (qbdebug.h/.bi/.bm) ---> Read Docs

These files provide a set of functions to open, close and write either plain or formatted information into a logfile. On the QB64 level you simply use the functions provided in the qbdebug.bm file, for use on the C/C++ level you just need to #include the qbdebug.h header file into your own .h header file and also declare the used functions from the qbdebug namespace.

Have a look into QB-StdLibs\qbstdarg.h and QB-StdLibs\qbstdio.h to see how it must be done on the C/C++ level.


 

 

 

RhoSigma Includes (QB64Library/RS-Includes)


This is a collection of some include files I wrote a while back, they are probably outdated since memblocks were implemented into QB64, but maybe somebody is interested in it for educational purposes. I just don't want to throw away this work, as it took a lot of time to write it.

Struct Types (types.bi/.bm) ---> Read Docs

Setup C/C++ like structure types in your programs. You may use these as addition/alternative to the standard DEF TYPE like user datatypes.

Memory Allocator (memory.bi/.bm) ---> Read Docs

Setup a private memory pool in your programs by using a big dimensioned numeric array as continuously addressed memory region. Used mainly to provide storage space for the content of C/C++ like structures defined with the types.bi/.bm functions, but in general you may store everything.

Doubly Linked Lists (lists.bi/.bm) ---> Read Docs

Create and operate doubly linked list constructs to effectively organize data records. The lists are build with the structure types of types.bi/.bm and are using the memory.bi/.bm provided memory pool for content storage.