Welcome

Thursday, 22 October 2026 13:48 UTC

Welcome to terminalspin.co.uk.

This site will contain information about programming C applications with PFL, a lightweight, full-featured, object framework for Linux.

Current Status: Under Construction.

Over the past week I've been mostly working through some minor but important base library issues and hopefully nearing the point where I'm comfortable releasing an initial version of the base library.

One interesting issue was around the constant PFL_Str (string) objects, e.g. PFL_STR_C_EMPTY - a global constant empty string. These constants had lazy-loaded attributes such as bytes_length, chars_length and also the hash value. They may technically have been subject to a race-condition if used in a thread uninitialised.

There are a number of string constants that needed looking at. Some global public ones like PFL_STR_C_EMPTY and others more specific like PFLHTTPD_STR_C_MIME_BINARY - the web-server's private default mime-type string. ("application/octet-stream")

In the end I added a set of hook callbacks for C files. These get called at application startup and shutdown to perform any file-level initialisation, such as the string constant pre-initialiser.

for example:-

void
pflhttpd_app_hook_start ()
{
    pfl_str_i_pre_init (
        PFLHTTPD_STR_C_HEADER_NAME_VAL_SEP,
        PFLHTTPD_STR_C_GET,
        PFLHTTPD_STR_C_TMP_DIR,
        PFLHTTPD_STR_C_SESSION_ID,
        PFLHTTPD_STR_C_MIME_BINARY
    );    
}

Also, I've added a couple more overview pages:-

Check back soon.