C Collections

Manual

One page for each public function and macro, and an overview page for each module. These are the pages that man shows after make install.

cbstmap

cbstmap(7)
overview of the cbstmap ordered map
cbmap_construct(3)
type-inferred BST map construction
cbmap_construct_cc(3)
declare and create an ordered map ordered by a custom comparison procedure
cbmap_construct_cc_scoped(3)
declare and create an ordered map with a custom comparison procedure, destroyed on scope exit
cbmap_construct_full(3)
declare and create an ordered map with custom allocation and comparison
cbmap_construct_full_scoped(3)
declare and create an ordered map with custom allocation and comparison, destroyed on scope exit
cbmap_construct_mp(3)
declare and create an ordered map that takes its memory from a custom allocator
cbmap_construct_mp_scoped(3)
declare and create an ordered map with a custom allocator, destroyed on scope exit
cbmap_construct_scoped(3)
declare and create an ordered map that is destroyed on scope exit
cbmap_declare(3)
declare an ordered map handle and its companion type variables
cbmap_declare_scoped(3)
declare an ordered map handle that is destroyed on scope exit
cbmap_destroy(3)
destroy a BST map and set pointer to NULL
cbmap_get(3)
get value by key (type-inferred, returns value)
cbmap_get_ptr(3)
get pointer to value by key (type-inferred)
cbmap_init(3)
create an ordered map with defaults into an already declared handle
cbmap_init_cc(3)
create an ordered map with a custom comparison procedure into an already declared handle
cbmap_init_full(3)
create an ordered map with a custom allocator and comparison into an already declared handle
cbmap_init_mp(3)
create an ordered map with a custom allocator into an already declared handle
cbmap_insert(3)
insert a key-value pair (type-inferred)
cbmap_redeclare(3)
re-establish the companion type variables for an ordered map handle from another scope
cbmap_remove(3)
remove a key-value pair (type-inferred)
cbmap_reset(3)
clear all entries from a BST map (type-inferred wrapper)
cbmap_size(3)
get the number of entries in a BST map (type-inferred wrapper)
cbstmap_begin_iter(3)
create an iterator positioned at an ordered map's first entry
cbstmap_create(3)
create a BST map with default settings
cbstmap_create_ch(3)
create a BST map ordered by a custom comparison procedure
cbstmap_create_full(3)
create a BST map with full customization
cbstmap_create_mp(3)
create a BST map with custom memory management procedures
cbstmap_destroy(3)
destroy a BST map and set pointer to NULL
cbstmap_get_elem_copy(3)
copy the value associated with a key out of a BST map
cbstmap_get_elem_ref(3)
get the location and the size of the value of a key
cbstmap_insert_elem(3)
insert a key-value pair into the BST map
cbstmap_remove_elem(3)
remove a key-value pair from the BST map
cbstmap_reset(3)
clear all elements from the map
cbstmap_size(3)
get the number of elements in the map

chashmap

chashmap(7)
overview of the chashmap hash map
chashmap_begin_iter(3)
create an iterator positioned at a hash map's first entry
chashmap_create(3)
create a hash map with default settings
chashmap_create_ch(3)
create a hash map with a custom hashing procedure
chashmap_create_full(3)
create a hash map with full customization
chashmap_create_mp(3)
create a hash map with custom memory management procedures
chashmap_destroy(3)
destroy a hash map and set pointer to NULL
chashmap_destroy_with_dtor(3)
destroy a hash map, running a destructor on every value first, without allocating memory
chashmap_get_elem_copy(3)
copy the value associated with a key out of a hash map
chashmap_get_elem_ref(3)
get the location and the size of the value of a key
chashmap_insert_elem(3)
insert a key-value pair into the hash map
chashmap_remove_elem(3)
remove a key-value pair from the hash map
chashmap_reset(3)
clear all elements from the hash map
chashmap_size(3)
get the number of elements in the hash map
chmap_construct(3)
type-inferred hash map construction
chmap_construct_ch(3)
declare and create a hash map that hashes its keys with a custom procedure
chmap_construct_ch_scoped(3)
declare and create a hash map with a custom hashing procedure, destroyed on scope exit
chmap_construct_full(3)
declare and create a hash map with custom allocation, hashing and key equality
chmap_construct_full_scoped(3)
declare and create a hash map with custom allocation, hashing and key equality, destroyed on scope exit
chmap_construct_mp(3)
declare and create a hash map that takes its memory from a custom allocator
chmap_construct_mp_scoped(3)
declare and create a hash map with a custom allocator, destroyed on scope exit
chmap_construct_scoped(3)
declare and create a hash map that is destroyed on scope exit
chmap_declare(3)
declare a hash map handle and its companion type variables
chmap_declare_scoped(3)
declare a hash map handle that is destroyed on scope exit
chmap_destroy(3)
destroy a hash map and set pointer to NULL
chmap_get(3)
get value by key (type-inferred, returns value)
chmap_get_ptr(3)
get pointer to value by key (type-inferred)
chmap_init(3)
create a hash map into an already declared handle
chmap_init_ch(3)
create a hash map with a custom hashing procedure into an already declared handle
chmap_init_full(3)
create a hash map with a custom allocator, hashing procedure and key equality procedure into an already declared handle
chmap_init_mp(3)
create a hash map with a custom allocator into an already declared handle
chmap_insert(3)
insert a key-value pair (type-inferred)
chmap_redeclare(3)
re-establish the companion type variables for a hash map handle from another scope
chmap_remove(3)
remove a key-value pair (type-inferred)
chmap_reset(3)
clear all entries from a hash map (type-inferred wrapper)
chmap_size(3)
get the number of entries in a hash map (type-inferred wrapper)

chttp

chttp(7)
overview of the HTTP types that chttpclient and chttpserver share
CHTTP_BODY(3)
construct a chttp_request_body with an explicit content type
CHTTP_FORM_BODY(3)
construct a chttp_request_body for URL-encoded form content
CHTTP_JSON_BODY(3)
construct a chttp_request_body for JSON content
CHTTP_NO_BODY(3)
construct a chttp_request_body for a bodyless request
CHTTP_STATUS(3)
HTTP status code constants
CHTTP_TEXT_BODY(3)
construct a chttp_request_body for plain-text content
CHTTP_TLS_DEFAULT(3)
the initializer for the default TLS configuration
chttp_base64_decode(3)
decode a base64 string (default allocator)
chttp_base64_decode_mp(3)
decode a base64 string with a custom allocator
chttp_base64_encode(3)
encode a buffer as base64 (default allocator)
chttp_base64_encode_mp(3)
encode a buffer as base64 with a custom allocator
chttp_basic_auth(3)
build an HTTP Basic auth header value (default allocator)
chttp_basic_auth_mp(3)
build an HTTP Basic auth header value with a custom allocator
chttp_method_str(3)
give the canonical string for an HTTP method

chttpclient

chttpclient(7)
overview of the HTTP/1.1 client of the C Collections Library
chttp_default_client(3)
give the default HTTP client of the process
chttp_delete(3)
do a DELETE request with the default client
chttp_do_default(3)
do an HTTP request with the default client
chttp_get(3)
do a GET request with the default client
chttp_patch(3)
do a PATCH request with the default client
chttp_perform(3)
run one request with explicit headers, with the default client
chttp_post(3)
do a POST request with the default client
chttp_put(3)
do a PUT request with the default client
chttp_request_create(3)
allocate and initialize an HTTP request (default allocator)
chttp_request_create_mp(3)
allocate and initialize an HTTP request with a custom allocator
chttp_request_free(3)
free an HTTP request and every resource that it owns
chttp_request_get_header(3)
look up a request header by name
chttp_request_set_header(3)
set a request header, or replace one
chttpcli_async_result_free(3)
free a chttpcli_async_result
chttpcli_async_result_get(3)
block until the future of an async request is fulfilled, then give its typed result
chttpcli_construct(3)
declare and initialize a chttpcli handle
chttpcli_construct_scoped(3)
declare and initialize a chttpcli handle that the library destroys automatically
chttpcli_create(3)
create an HTTP client with the default allocator
chttpcli_create_mp(3)
create an HTTP client with a custom allocator
chttpcli_declare(3)
declare a chttpcli handle variable
chttpcli_declare_scoped(3)
declare a scoped chttpcli handle variable
chttpcli_destroy(3)
destroy an HTTP client and invalidate the handle
chttpcli_do(3)
do an HTTP request and buffer the full response
chttpcli_do_async(3)
submit an HTTP request for asynchronous execution
chttpcli_do_async_streaming(3)
submit an HTTP request for asynchronous execution, and stream the response body
chttpcli_do_pooled(3)
do an HTTP request on the shared Tier 2 engine, and block until it finishes
chttpcli_do_pooled_streaming(3)
do an HTTP request on the shared Tier 2 engine and stream the response body, and block until it finishes
chttpcli_do_streaming(3)
do an HTTP request and stream the response body
chttpcli_engine_wait(3)
block until the async engine of chttpclient has stopped completely
chttpcli_resp_free(3)
free a response and every resource that it owns
chttpcli_resp_header(3)
look up a response header by name
chttpcli_resp_header_at(3)
get one occurrence of a response header
chttpcli_resp_header_count(3)
count the lines of a response header
chttpcli_set_connect_timeout(3)
set the TCP connect timeout
chttpcli_set_engine_logger(3)
set the logger for the diagnostics of the async engine of chttpclient
chttpcli_set_engine_mem_mgmt_procs(3)
set custom memory management for the allocations of the async engine of chttpclient
chttpcli_set_engine_num_reactor_threads(3)
set the OS thread count of the async engine reactor of chttpclient
chttpcli_set_inactivity_timeout(3)
set how long a request may wait on a silent connection
chttpcli_set_max_response_body_size(3)
cap the size of a response body in the buffer
chttpcli_set_pool_size(3)
set the connection pool size
chttpcli_set_request_timeout(3)
set the total request timeout
chttpcli_set_tls(3)
set the TLS configuration of a client

chttpserver

chttpserver(7)
overview of the chttpsvr HTTP/1.1 server
CHTTPSVR_CONFIG_DEFAULT(3)
initializer for chttpsvr_config with reasonable defaults
chttpsvr_bound_address(3)
write the address that a server listens on
chttpsvr_bound_port(3)
report the TCP port that a server listens on
chttpsvr_construct(3)
declare and initialize a chttpsvr handle
chttpsvr_construct_scoped(3)
declare a chttpsvr handle, initialize it, and destroy it automatically
chttpsvr_create(3)
create an HTTP server with the default allocator
chttpsvr_create_mp(3)
create an HTTP server with a custom allocator
chttpsvr_declare(3)
declare a chttpsvr variable that is not initialized
chttpsvr_declare_scoped(3)
declare a chttpsvr variable with automatic destruction
chttpsvr_destroy(3)
destroy a chttpsvr handle and set it to CHTTPSVR_NULL
chttpsvr_engine_stop(3)
signal the engine to stop
chttpsvr_engine_wait(3)
wait for the engine thread to exit
chttpsvr_is_running(3)
report whether a server listens
chttpsvr_register_handler(3)
register a buffered handler on the root router
chttpsvr_register_streaming_handler(3)
register a streaming handler on the root router
chttpsvr_req_body(3)
access the buffered request body
chttpsvr_req_context(3)
read a value that a middleware attached to a request
chttpsvr_req_header(3)
look up a request header
chttpsvr_req_method(3)
return the HTTP method of a request
chttpsvr_req_param(3)
look up a named path parameter
chttpsvr_req_path(3)
return the URL path of a request
chttpsvr_req_peer_cert_der(3)
give the DER encoding of the verified client certificate
chttpsvr_req_peer_cert_sha256(3)
write the SHA-256 fingerprint of the verified client certificate
chttpsvr_req_peer_cert_subject(3)
give the subject of the verified client certificate
chttpsvr_req_peer_cert_verified(3)
report whether the TLS client presented a verified certificate
chttpsvr_req_query(3)
look up all values for a query parameter
chttpsvr_req_query_one(3)
look up a single-valued query parameter
chttpsvr_req_query_oom(3)
check whether chttpsvr_req_query ran out of memory
chttpsvr_req_raw_query(3)
return the raw query string of a request
chttpsvr_req_read(3)
read body bytes as they arrive (streaming handlers)
chttpsvr_req_set_context(3)
attach a value to a request for later middleware and the handler
chttpsvr_req_stream_error(3)
report why the last chttpsvr_req_read call failed
chttpsvr_resp_add_header(3)
add one more field of a response header
chttpsvr_resp_printf(3)
format and append a printf-style string to the response body
chttpsvr_resp_set_header(3)
set a response header, replacing every field of that name
chttpsvr_resp_set_status(3)
set the HTTP response status code
chttpsvr_resp_write(3)
append bytes to the response body
chttpsvr_resp_write_json(3)
append JSON to the response body
chttpsvr_resp_write_str(3)
append a string to the response body
chttpsvr_router_register_handler(3)
register a buffered handler on a sub-router
chttpsvr_router_register_streaming_handler(3)
register a streaming handler on a sub-router
chttpsvr_router_use(3)
append middleware to a sub-router
chttpsvr_set_engine_logger(3)
set the logger for engine-level diagnostics
chttpsvr_set_engine_mem_mgmt_procs(3)
set custom memory management for engine-level allocations
chttpsvr_set_engine_num_reactor_threads(3)
set the OS thread count for the shared engine's reactor
chttpsvr_start(3)
register a listener with the running engine
chttpsvr_stop(3)
close this server's listener
chttpsvr_subrouter(3)
create a sub-router with a path prefix
chttpsvr_use(3)
append global middleware to the root router

citerators

citerators(7)
overview of the citerators API
ccol_begin(3)
begin iteration over any supported container
ccol_end(3)
end sentinel for iteration
ccol_for_each(3)
iterate over all elements of any supported container
ccol_iter_declare(3)
declare a typed iterator variable with RAII cleanup
ccol_iter_destroy(3)
destroy a unified iterator before the end
ccol_iter_key_ptr(3)
get a typed const pointer to the current key
ccol_iter_next(3)
move a unified iterator on to the next element
ccol_iter_val_ptr(3)
get a typed pointer to the current value

cjson

cjson(7)
overview of the JSON parser, serializer and DOM
cjson_bool_val(3)
read a scalar value from a DOM node
cjson_clone(3)
deep-copy a DOM subtree
cjson_create_bool(3)
see cjson_create_null_mp(3)
cjson_create_bool_mp(3)
see cjson_create_null_mp(3)
cjson_create_dictionary(3)
see cjson_create_null_mp(3)
cjson_create_dictionary_mp(3)
see cjson_create_null_mp(3)
cjson_create_double(3)
see cjson_create_null_mp(3)
cjson_create_double_mp(3)
see cjson_create_null_mp(3)
cjson_create_int(3)
see cjson_create_null_mp(3)
cjson_create_int_mp(3)
see cjson_create_null_mp(3)
cjson_create_list(3)
see cjson_create_null_mp(3)
cjson_create_list_mp(3)
see cjson_create_null_mp(3)
cjson_create_null(3)
see cjson_create_null_mp(3)
cjson_create_null_mp(3)
allocate DOM nodes with a custom or default allocator
cjson_create_string(3)
see cjson_create_null_mp(3)
cjson_create_string_mp(3)
see cjson_create_null_mp(3)
cjson_declare(3)
declare an uninitialized cjson variable
cjson_declare_scoped(3)
declare a cjson variable with automatic destruction
cjson_destroy(3)
free a DOM tree and NULL the handle
cjson_dictionary_first(3)
start an iteration over the members of an object node
cjson_dictionary_get(3)
look up a key in an object node
cjson_dictionary_next(3)
step a dictionary cursor onto the next member
cjson_dictionary_remove(3)
remove and free a key from an object node
cjson_dictionary_set(3)
set or replace a key in an object node
cjson_dictionary_size(3)
see cjson_list_size(3)
cjson_double_val(3)
see cjson_bool_val(3)
cjson_get(3)
navigate to a DOM node with a dot-separated path
cjson_int_val(3)
see cjson_bool_val(3)
cjson_list_get(3)
access an array element by index
cjson_list_push(3)
append a child to an array node
cjson_list_remove(3)
remove and free an element from an array node by index
cjson_list_size(3)
query composite node sizes
cjson_parse(3)
see cjson_parse_mp(3)
cjson_parse_mp(3)
parse a null-terminated JSON string into a DOM tree
cjson_parse_n(3)
see cjson_parse_n_mp(3)
cjson_parse_n_mp(3)
parse a bounded JSON buffer into a DOM tree
cjson_remove(3)
remove and free the DOM node at a dot-separated path
cjson_serialize(3)
serialize a DOM tree to a compact JSON string
cjson_serialize_free(3)
see cjson_serialize_free_mp(3)
cjson_serialize_free_mp(3)
free a string returned by the serializer
cjson_serialize_pretty(3)
serialize a DOM tree to an indented JSON string
cjson_set(3)
write a C scalar to the DOM leaf at a dot-separated path
cjson_str_val(3)
see cjson_bool_val(3)
cjson_type(3)
return the type tag of a DOM node
cjson_type_str(3)
name a DOM node's type as a printable string

clogger

clogger(7)
overview of the structured logger
ccol_set_thread_name(3)
rename the calling thread and make its log records carry the new name
clog_alert(3)
emit a log line at ALERT level with a backtrace
clog_clear_fields(3)
remove all attached structured fields
clog_close(3)
flush, close, and free a logger
clog_create_from_fd(3)
see clog_create_from_fd_mp(3)
clog_create_from_fd_mp(3)
create a logger writing to an existing file descriptor
clog_create_from_file_path(3)
see clog_create_from_file_path_mp(3)
clog_create_from_file_path_mp(3)
create a file-backed logger with optional log rotation
clog_debug(3)
emit a log line at DEBUG level
clog_derive(3)
create a derived logger sharing the same output target
clog_error(3)
emit a log line at ERROR level with a backtrace
clog_fatal(3)
emit a log line at FATAL level with a backtrace, then terminate the process
clog_flush(3)
block until queued log records are written
clog_get_facility(3)
return the current syslog facility
clog_get_format(3)
return the current output format
clog_get_level(3)
return the current minimum log level
clog_info(3)
emit a log line at INFO level
clog_remove_field(3)
remove a previously attached structured field
clog_set_facility(3)
change the syslog facility
clog_set_field(3)
attach or update a persistent structured field
clog_set_format(3)
change the output format at runtime
clog_set_level(3)
change the minimum log level at runtime
clog_set_signal_policy(3)
choose what the logger may do about SIGPIPE and SIGXFSZ
clog_trace(3)
emit a log line at TRACE level
clog_warn(3)
emit a log line at WARN level

clrucache

clrucache(7)
overview of the thread-safe LRU cache
ccache_capacity(3)
get the capacity of an LRU cache (type-inferred wrapper)
ccache_construct(3)
declare and initialise an LRU cache in one step
ccache_construct_scoped(3)
declare and initialise an LRU cache that is destroyed at scope exit
ccache_declare(3)
declare an uninitialised LRU cache variable with type tracking
ccache_declare_scoped(3)
declare an LRU cache that is destroyed at scope exit
ccache_destroy(3)
destroy an LRU cache and invalidate the handle
ccache_get(3)
get a value by key (a type-inferred convenience wrapper)
ccache_init(3)
initialise a previously declared LRU cache variable
ccache_redeclare(3)
restore the type-tracking variables for a cache that crosses scopes
ccache_set(3)
store a value by key (a type-inferred convenience wrapper)
ccache_size(3)
get the number of live entries in an LRU cache (type-inferred wrapper)
clrucache_capacity(3)
return the maximum capacity of the cache
clrucache_create_full(3)
create an LRU cache with full control
clrucache_destroy(3)
destroy an LRU cache and invalidate the handle
clrucache_get_full(3)
get a value by key
clrucache_set_full(3)
store a value by key (write-through)
clrucache_size(3)
return the number of live entries in the cache

cmempool

cmempool(7)
overview of the fixed-size and ranged memory pools
CMEMPOOL_DECLARE_PREALLOCATED_BUFFER(3)
declare buffer for memory pool
CRMEMPOOL_DECLARE_PREALLOCATED_BUFFER(3)
declare buffer for ranged memory pool
cmempool_alloc_entry(3)
allocate an entry from the pool
cmempool_allocated_bytes(3)
report the memory a pool holds for its entries
cmempool_calloc_entry(3)
allocate zero-initialized entry from pool
cmempool_create(3)
create a fixed-size memory pool
cmempool_create_from_preallocated_buffer(3)
create pool from user buffer
cmempool_create_from_preallocated_buffer_mp(3)
create pool from user buffer
cmempool_create_mp(3)
create a fixed-size memory pool
cmempool_destroy(3)
destroy a memory pool and set pointer to NULL
cmempool_dynamic_allocs_count(3)
report outstanding fallback allocations
cmempool_free_entry(3)
free an entry back to the pool
cmempool_total_capacity(3)
report the number of elements a pool holds
cmempool_used_count(3)
report how many pool elements are in use
crmempool_alloc_entry(3)
allocate an entry from the ranged pool
crmempool_allocated_bytes(3)
report the memory a ranged pool holds for its entries
crmempool_calloc_entry(3)
allocate zero-initialized entry
crmempool_create(3)
create a ranged memory pool
crmempool_create_from_preallocated_buffer(3)
create ranged pool from user buffer
crmempool_create_from_preallocated_buffer_mp(3)
create ranged pool from user buffer
crmempool_create_mp(3)
create a ranged memory pool
crmempool_destroy(3)
destroy a ranged memory pool
crmempool_dynamic_allocs_count(3)
get number of dynamic allocations
crmempool_free_entry(3)
free an entry back to the ranged pool
crmempool_realloc_entry(3)
reallocate an entry to a different size
crmempool_total_capacity(3)
get total capacity for a size
crmempool_used_count(3)
get number of used entries for a size

ccollections

ccollections(7)
library-wide conventions of c_collections: Return codes, fatal errors, custom allocators, timeouts, thread safety and fork()
ccol_determine_ccol_data_type(3)
the data type enumerator that matches the type of an expression
ccol_fixed_width_data_type_size(3)
byte size of the C type that a ccol_data_type names
ccol_retval_to_str(3)
name of a ccol_retval code as a string
ccol_scoped_ptr(3)
declare a raw pointer that is freed automatically at scope exit
ccol_scoped_ptr_mp(3)
declare a raw pointer that a custom allocator frees automatically at scope exit
ccol_scoped_ptr_release(3)
release the ownership of a scoped pointer so that it is not freed automatically
ccol_version(3)
version of the library a program runs with
ccol_version_string(3)
see ccol_version(3)

csort

csort(7)
overview of the csort stable mergesort
csort_get_default_comparison_proc(3)
get default comparison for a type
csort_sort(3)
sort any collection with custom getter and comparison

cstring

cstring(7)
overview of the cstring dynamic string
cstr_append(3)
append a C string, and call ccol__fatal_err() on failure
cstr_at(3)
return the character at a given index
cstr_c_str(3)
return a pointer to the null-terminated character data
cstr_compare(3)
compare the string to a C string
cstr_construct(3)
declare and initialise a cstr in one step
cstr_construct_mp(3)
declare and initialise a cstr with custom memory management
cstr_construct_mp_scoped(3)
declare and initialise a cstr with custom mprocs and RAII
cstr_construct_scoped(3)
declare and initialise a cstr with automatic RAII
cstr_copy(3)
create an independent copy of a string
cstr_declare(3)
declare an uninitialised cstr variable
cstr_declare_scoped(3)
declare a cstr variable with automatic RAII destruction
cstr_destroy(3)
destroy a cstr and set it to NULL
cstr_ends_with(3)
check whether the string ends with a suffix
cstr_equals(3)
check whether the string equals a C string
cstr_find(3)
find the first occurrence of a substring
cstr_init(3)
initialise a declared cstr with the default allocators
cstr_init_mp(3)
initialise a declared cstr with custom memory management
cstr_insert(3)
insert a C string at a position, and call ccol__fatal_err() on failure
cstr_is_empty(3)
check whether the string holds no characters
cstr_length(3)
return the number of characters in the string
cstr_prepend(3)
prepend a C string, and call ccol__fatal_err() on failure
cstr_replace(3)
replace all the occurrences of needle, and call ccol__fatal_err() on failure
cstr_reserve(3)
reserve capacity, and call ccol__fatal_err() on failure
cstr_reset(3)
clear all the characters and shrink the capacity to the minimum
cstr_rfind(3)
find the last occurrence of a substring
cstr_set(3)
replace the full content, and call ccol__fatal_err() on failure
cstr_split(3)
split the string by a delimiter
cstr_starts_with(3)
check whether the string begins with a prefix
cstr_substring(3)
create a new string from a sub-range, and call ccol__fatal_err() on failure
cstr_to_lower(3)
convert the ASCII letters to lowercase in-place
cstr_to_upper(3)
convert the ASCII letters to uppercase in-place
cstr_trim(3)
strip the whitespace at the start and at the end, in-place
cstring_append(3)
append a C string to the end
cstring_at(3)
return the character at a given index
cstring_c_str(3)
return a pointer to the null-terminated character data
cstring_compare(3)
compare the string to a C string
cstring_copy(3)
create an independent copy of a string
cstring_create(3)
create a string with default memory management
cstring_create_full(3)
create a string with custom memory management
cstring_destroy(3)
destroy a string and set its pointer to NULL
cstring_ends_with(3)
check whether the string ends with a suffix
cstring_equals(3)
check whether the string equals a C string
cstring_find(3)
find the first occurrence of a substring
cstring_get_mprocs(3)
get the memory management procedures for a string
cstring_insert(3)
insert a C string at a given position
cstring_is_empty(3)
check whether the string contains no characters
cstring_length(3)
return the number of characters in the string
cstring_new(3)
create a string with default memory management (optimistic)
cstring_prepend(3)
prepend a C string to the beginning
cstring_replace(3)
replace every non-overlapping occurrence of needle
cstring_reserve(3)
pre-allocate capacity for at least min_capacity bytes
cstring_reset(3)
clear all characters and shrink capacity to minimum
cstring_rfind(3)
find the last occurrence of a substring
cstring_set(3)
replace the entire content with a new C string
cstring_split(3)
split the string by a delimiter
cstring_starts_with(3)
check whether the string begins with a prefix
cstring_substring(3)
create a new string from a sub-range
cstring_to_lower(3)
convert the ASCII letters to lowercase in-place
cstring_to_upper(3)
convert the ASCII letters to uppercase in-place
cstring_trim(3)
strip leading and trailing whitespace in-place

cthreadcomm

cthreadcomm(7)
overview of the thread communication API
cchan_create(3)
create a two-way communication cchan
cchan_create_mp(3)
create a two-way cchan with custom memory management
cchan_destroy(3)
destroy a cchan
cchan_disable_sending(3)
turn off sends on a cchan direction
cchan_enable_sending(3)
turn on sends on a cchan direction
cchan_msg_count(3)
get the current message count of a direction
cchan_recv(3)
receive a message from the cchan (it blocks)
cchan_selectable(3)
resolve a cchan into a cselectable for the calling thread and requested direction
cchan_send(3)
send a message through the cchan (it blocks)
cchan_timed_recv(3)
receive a message with a timeout
cchan_timed_send(3)
send a message with a timeout
cchan_try_recv(3)
try to receive a message with no block
cchan_try_send(3)
try to send a message with no block
ccircq_create(3)
create a circular queue
ccircq_create_mp(3)
create a circular queue with custom memory management
ccircq_destroy(3)
destroy a circular queue
ccircq_disable_sending(3)
turn off sends on a circular queue
ccircq_enable_sending(3)
turn on sends on a circular queue
ccircq_msg_count(3)
get the current message count of a circular queue
ccircq_recv(3)
receive a message (it blocks)
ccircq_selectable(3)
build a cselectable from a ccircq
ccircq_send(3)
send a message to the queue (it blocks)
ccircq_timed_recv(3)
receive a message with a timeout
ccircq_timed_send(3)
send a message with a timeout
ccircq_try_recv(3)
try to receive a message with no block
ccircq_try_send(3)
try to send a message with no block
cdynmq_create(3)
create a dynamic queue with no size limit
cdynmq_create_mp(3)
create a dynamic queue with no size limit and with custom memory management
cdynmq_destroy(3)
destroy a dynamic queue
cdynmq_disable_sending(3)
turn off sends on a dynamic queue
cdynmq_enable_sending(3)
turn sends on again on a dynamic queue
cdynmq_msg_count(3)
number of messages that a dynamic queue holds now
cdynmq_recv(3)
receive a message from a dynamic queue (it blocks)
cdynmq_selectable(3)
build a cselectable from a cdynmq
cdynmq_send(3)
send a message to a dynamic queue (no block)
cdynmq_timed_recv(3)
receive a message from a dynamic queue with a timeout
cdynmq_try_recv(3)
try to receive from a dynamic queue with no block
ceventloop_add(3)
register a selectable with an event loop
ceventloop_construct(3)
declare and initialise a ceventloop in one step
ceventloop_construct_scoped(3)
declare, initialise, and auto-destroy a ceventloop on scope exit
ceventloop_create(3)
create a ceventloop with default memory management
ceventloop_create_mp(3)
create a persistent event loop
ceventloop_declare(3)
declare an uninitialised ceventloop variable
ceventloop_declare_scoped(3)
declare a ceventloop with automatic destruction on scope exit
ceventloop_destroy(3)
destroy a ceventloop and invalidate the handle
ceventloop_modify(3)
change an existing fd registration's direction
ceventloop_pause(3)
temporarily stop delivering events for an fd registration, without destroying it
ceventloop_reg_count(3)
number of currently-registered ceventloop_reg handles
ceventloop_reg_generation(3)
caller-visible identity token for a registration's fd
ceventloop_remove(3)
deregister a selectable from an event loop
ceventloop_resume(3)
resume event delivery for a registration previously paused by ceventloop_pause
ceventloop_shutdown(3)
stop an event loop's poller and dispatch worker threads
cselect(3)
wait for readiness on any of several queues or file descriptors (blocking)
cselect_timed(3)
see cselect(3)
cselect_timed_va(3)
see cselect_va(3)
cselect_va(3)
wait for readiness on an inline list of selectables (convenience macro)
cselectable_fd(3)
build a cselectable from a raw file descriptor

cthreadpool

cthreadpool(7)
overview of the cthrpool thread pool and its futures
cthrpool_active_count(3)
number of tasks that run now
cthrpool_construct(3)
declare and initialise a thread pool in one step
cthrpool_construct_scoped(3)
declare, initialise, and auto-destroy a thread pool
cthrpool_create(3)
create a thread pool with default memory management
cthrpool_create_mp(3)
create a thread pool with custom memory management
cthrpool_declare(3)
declare an uninitialised thread pool variable
cthrpool_declare_scoped(3)
declare a thread pool variable with automatic RAII destruction
cthrpool_destroy(3)
destroy a thread pool and invalidate the handle
cthrpool_future_cancelled(3)
check whether a future was cancelled
cthrpool_future_create_detached(3)
create a standalone future with no pool or queued task
cthrpool_future_done(3)
non-blocking check for future completion
cthrpool_future_free(3)
release the caller's reference to a future
cthrpool_future_fulfill(3)
deliver a result to a detached future
cthrpool_future_get(3)
block until the future has a result
cthrpool_pending_count(3)
number of tasks in the queue
cthrpool_shutdown_drain(3)
graceful shutdown
cthrpool_shutdown_immediate(3)
immediate shutdown
cthrpool_submit(3)
submit a task (blocking when bounded queue is full)
cthrpool_submit_future(3)
submit a task that returns a void* result (blocking)
cthrpool_timed_submit(3)
submit a task with a timeout
cthrpool_timed_submit_future(3)
submit a future task with a relative timeout
cthrpool_try_submit(3)
submit a task without blocking
cthrpool_try_submit_future(3)
submit a future task without blocking
cthrpool_wait(3)
block until the pool is idle

cvector

cvector(7)
overview of the cvector dynamic array
cvec_append_array(3)
append a C array to a vector (type-inferred, fatal on failure)
cvec_append_cvec(3)
append one vector onto another (type-inferred, fatal on failure)
cvec_at(3)
access element at index (type-inferred, returns reference)
cvec_at_ptr(3)
access element at index (type-inferred, returns pointer or NULL)
cvec_construct(3)
type-inferred vector construction
cvec_construct_mp(3)
declare and create a vector with a custom allocator
cvec_construct_mp_scoped(3)
construct a vector with a custom allocator, destroyed automatically at scope exit
cvec_construct_scoped(3)
construct a vector destroyed automatically at scope exit
cvec_data_ptr(3)
get a pointer to a vector's contiguous backing store
cvec_declare(3)
declare a vector variable and its companion type variables
cvec_declare_scoped(3)
declare a vector variable destroyed automatically at scope exit
cvec_destroy(3)
destroy a vector and clear the handle (type-inferred wrapper)
cvec_find(3)
find the first element with a given value (type-inferred)
cvec_init(3)
create the vector behind a declared handle (fatal on failure)
cvec_init_mp(3)
create the vector behind a declared handle with a custom allocator
cvec_pop(3)
pop an element from the vector (type-inferred)
cvec_push(3)
push an element onto the vector (type-inferred)
cvec_redeclare(3)
declare the companion type variables again for a vector from another scope
cvec_reserve(3)
reserve capacity for future elements (type-inferred, fatal on failure)
cvec_reset(3)
clear all elements and shrink back to minimum capacity (type-inferred)
cvec_size(3)
get the number of elements (type-inferred wrapper)
cvec_sort(3)
sort a vector with the default comparison for its type
cvec_sort_with(3)
sort vector with custom comparison
cvector_append_array(3)
append an array of elements to a vector
cvector_append_cvector(3)
append a vector to a vector
cvector_at(3)
access an element at a specific index
cvector_begin_iter(3)
create an iterator positioned at a vector's first element
cvector_create(3)
create a vector with default memory management
cvector_create_full(3)
create a vector with custom memory management
cvector_data_ptr(3)
get pointer to internal data array
cvector_destroy(3)
destroy a vector and set pointer to NULL
cvector_find(3)
find the index of the first occurrence of an element
cvector_get_mprocs(3)
get the memory management procedures of a vector
cvector_pop_back(3)
remove and return the last element from the vector
cvector_push_back(3)
append an element to the end of the vector
cvector_reserve(3)
reserve capacity for future elements
cvector_reset(3)
clear all elements and reset capacity
cvector_size(3)
get the number of elements in the vector

cyaml

cyaml(7)
overview of the YAML 1.2 parser, serializer and DOM
cyaml_bool_val(3)
extract a boolean value from a CYAML_BOOL node
cyaml_clone(3)
produce a deep independent copy of a DOM subtree
cyaml_create_bool(3)
see cyaml_create_bool_mp(3)
cyaml_create_bool_mp(3)
allocate a YAML boolean node
cyaml_create_dictionary(3)
see cyaml_create_dictionary_mp(3)
cyaml_create_dictionary_mp(3)
allocate an empty YAML dictionary node
cyaml_create_double(3)
see cyaml_create_double_mp(3)
cyaml_create_double_mp(3)
allocate a YAML floating-point node
cyaml_create_int(3)
see cyaml_create_int_mp(3)
cyaml_create_int_mp(3)
allocate a YAML integer node
cyaml_create_list(3)
see cyaml_create_list_mp(3)
cyaml_create_list_mp(3)
allocate an empty YAML list node
cyaml_create_null(3)
see cyaml_create_null_mp(3)
cyaml_create_null_mp(3)
allocate a YAML null node
cyaml_create_string(3)
see cyaml_create_string_mp(3)
cyaml_create_string_mp(3)
allocate a YAML string node
cyaml_declare(3)
declare an uninitialized cyaml variable
cyaml_declare_scoped(3)
declare a cyaml variable with automatic RAII destruction
cyaml_destroy(3)
recursively free a DOM tree and null the handle
cyaml_dictionary_first(3)
start an iteration over the members of a dictionary node
cyaml_dictionary_get(3)
look up a key in a dictionary
cyaml_dictionary_next(3)
step a dictionary cursor onto the next member
cyaml_dictionary_remove(3)
remove and free a key from a dictionary node
cyaml_dictionary_set(3)
insert or replace a key in a dictionary
cyaml_dictionary_size(3)
return the number of keys in a dictionary
cyaml_double_val(3)
extract a floating-point value from a CYAML_FLOAT node
cyaml_get(3)
navigate to a DOM node with a dot-separated path
cyaml_int_val(3)
extract an integer value from a CYAML_INTEGER node
cyaml_list_get(3)
access a list element by index
cyaml_list_push(3)
append a child to a list
cyaml_list_remove(3)
remove and free a list element by index
cyaml_list_size(3)
return the number of elements in a list
cyaml_node_set_tag(3)
attach, replace, or clear a node's YAML tag
cyaml_node_tag(3)
return a node's YAML tag
cyaml_parse(3)
see cyaml_parse_mp(3)
cyaml_parse_mp(3)
parse a null-terminated YAML string into a DOM tree
cyaml_parse_n(3)
see cyaml_parse_n_mp(3)
cyaml_parse_n_mp(3)
parse a bounded YAML buffer
cyaml_remove(3)
remove and free the DOM node at a dot-separated path
cyaml_serialize(3)
serialize a DOM tree to block-style YAML
cyaml_serialize_flow(3)
serialize a DOM tree to flow-style YAML
cyaml_serialize_free(3)
see cyaml_serialize_free_mp(3)
cyaml_serialize_free_mp(3)
free a serializer buffer
cyaml_serialize_stream(3)
serialize a list of documents as a multi-document YAML stream
cyaml_set(3)
write a C scalar to the DOM leaf addressed by a path
cyaml_str_val(3)
extract a string value from a CYAML_STRING node
cyaml_type(3)
return the type tag of a node
cyaml_type_str(3)
return a string name for a node's type