MCPcopy Create free account

hub / github.com/KaisenAmin/c_std / functions

Functions2,651 in github.com/KaisenAmin/c_std

↓ 236 callersFunctionmatrix_create
* @brief Creates a matrix with the specified number of rows and columns, initialized to zero. * * This function allocates memory for a matrix struct
matrix/matrix.c:271
↓ 114 callersFunctionmatrix_deallocate
* @brief Deallocates the memory associated with a matrix. * * This function frees the memory used by the matrix, including its data array. * If th
matrix/matrix.c:456
↓ 105 callersFunctionstring_strdup
* @brief This function allocates sufficient memory to hold a copy of the provided * C-string `s`, copies the content of `s` into the newly allocated
string/std_string.c:3750
↓ 88 callersFunctionmutex_unlock
* Unlocks a mutex. * * Releases a mutex that was previously locked by the calling thread. If the * mutex is a recursive mutex, it may need to be un
concurrent/concurrent.c:393
↓ 58 callersFunctionudp_set_last_error
Internal: set last error
network/udp.c:28
↓ 54 callersFunctionjson_deallocate
* @brief Deallocates a JSON element and all of its associated resources. * * @param element A pointer to the `JsonElement` to be deallocated. If th
json/json.c:208
↓ 53 callersFunctionencoding_utf8_to_wchar
* @brief Converts a UTF-8 encoded string to a wide character string (wchar_t) on Windows. * * @param utf8Str Pointer to the UTF-8 encoded string. *
encoding/encoding.c:2206
↓ 45 callersFunctionmutex_lock
* Locks a mutex. * * This function attempts to lock a mutex. If the mutex is already locked by * another thread, the calling thread will block unti
concurrent/concurrent.c:143
↓ 45 callersFunctionvector_size
* @brief Returns the number of elements currently stored in the vector. * * This function provides the current size of the vector, indicating how m
vector/vector.c:1292
↓ 40 callersFunctionudp_set_last_error_sys
Internal: set last error from system
network/udp.c:40
↓ 36 callersFunctionjson_get_element
* @brief Retrieves a specific element from a JSON object or array by key or index. * * @param element The JSON element, which must be an object or
json/json.c:1462
↓ 36 callersFunctionmatrix_get
* @brief Gets the value of a specific element in a matrix. * * This function retrieves the value of the matrix element at the specified row and colu
matrix/matrix.c:550
↓ 35 callersFunctionjson_create
* @brief Creates a new JSON element of the specified type. * * @param type The type of JSON element to create. This can be one of the following: *
json/json.c:1229
↓ 34 callersFunctionmatrix_set
* @brief Sets the value of a specific element in a matrix. * * This function sets the value of the matrix element at the specified row and column.
matrix/matrix.c:483
↓ 33 callersFunctionvector_push_back
Append `item` to the end. Inlined fast path when the buffer has room. */
vector/vector.h:93
↓ 30 callersFunctionbigfloat_create
* @brief Creates a new BigFloat initialized to 0.0. * @return Pointer to the new BigFloat, or NULL if allocation fails. */
bigfloat/bigfloat.c:9
↓ 29 callersFunctionswap
algorithm/algorithm.c:17
↓ 29 callersFunctionvector_at
Borrowed pointer to the element at `pos`, or NULL if out of bounds / NULL vec. */
vector/vector.h:103
↓ 28 callersFunctiontime_is_valid
* @brief This function checks if the provided Time object is valid. A valid Time object * has hours in the range 0-23, minutes in the range 0-59, se
time/std_time.c:111
↓ 26 callersFunctioncl_append_str
Append a C string to a growable buffer (no implicit NUL). */
network/http.c:2747
↓ 26 callersFunctionget_time_ms
Helper function to get current time in milliseconds
sort/sort.c:41
↓ 24 callersFunctionbigint_create
* @brief Creates a new BigInt initialized to zero. * * Allocates memory for a BigInt and initializes its value to 0. * * @return Pointer to the ne
bigint/bigint.c:21
↓ 24 callersFunctiondate_is_valid
* @brief Checks if the provided Date object represents a valid date. * * This function validates the year, month, and day components of the Date obj
date/date.c:874
↓ 24 callersFunctionlogp_unlock
log/log.c:28
↓ 22 callersFunctionencoding_wchar_to_utf8
* @brief Converts a wide character string (wchar_t) to a UTF-8 encoded string. * * @param wstr Pointer to the wide character string (wchar_t). *
encoding/encoding.c:2248
↓ 20 callersFunctionezxml_err
set an error string and return root
xml/xml.c:218
↓ 20 callersFunctiontcp_get_last_error
* @brief Retrieves the last system-specific error and formats it into a human-readable message. * * This function populates the given `TcpStatusInf
network/tcp.c:113
↓ 19 callersFunctionhttp_url_free
* @brief Free all strings owned by an HttpUrl and zero the struct. * * Releases scheme/userinfo/host/path/query/fragment, then memsets `*u` so it ca
network/http.c:2565
↓ 19 callersFunctionmatrix_is_square
* @brief Checks if a matrix is square. * * A square matrix has the same number of rows and columns. * * @param matrix The matrix to be checked. *
matrix/matrix.c:2492
↓ 18 callersFunctionfile_reader_close
* @brief Closes the file associated with the given `FileReader`. * * This function closes the file associated with the `FileReader` structure. * It
file_io/file_reader.c:112
↓ 18 callersFunctionjwt_deallocate
* @brief Release every allocation owned by a token. NULL is a safe no-op. * * Wipes the signature bytes with `OPENSSL_cleanse` before free so any *
jwt/jwt.c:2566
↓ 18 callersFunctionregex_deallocate
* @brief Frees resources allocated for the compiled regex object. * * @param regex The regex object to free. */
regex/std_regex.c:363
↓ 18 callersFunctionstring_create
* @brief Creates a new String object initialized with the given initial string. * * This function allocates memory for a new String object and initi
string/std_string.c:370
↓ 18 callersFunctionsysinfo_strdup_or
Small helper: dup a string but never return NULL. Falls back to a newly-allocated copy of `fallback` (which itself must not be NULL). Used by th
sysinfo/sysinfo.c:2453
↓ 17 callersFunctionplotcolor_to_raylib
plot/plot.c:22
↓ 17 callersFunctionpostgres_clear_result
* @brief Clears the result set returned by a query and frees the associated memory. * * @param pgResult Pointer to the PostgresResult structure to
database/postgres.c:290
↓ 16 callersFunctionvariant_none
* @brief Build an empty (NONE-tagged) variant. * * A NONE variant carries no value. It's the canonical "absence of a * value" — equivalent to `std:
variant/variant.c:80
↓ 16 callersFunctionvariant_type_name
* @brief Return a human-readable name for the variant's active type. * * Always returns a non-NULL static string. For CUSTOM variants, uses * `info
variant/variant.c:656
↓ 15 callersFunctionconv_num
date/date.c:698
↓ 15 callersFunctionfile_writer_close
* @brief Closes the file associated with the given `FileWriter`. * * This function closes the file associated with the `FileWriter` structure. * It
file_io/file_writer.c:226
↓ 15 callersFunctionfile_writer_open
* @brief Opens a file for writing, based on the specified mode. * * This function opens a file for writing according to the specified `WriteMode`.
file_io/file_writer.c:37
↓ 15 callersFunctionjwt_alg_to_string
* @brief Canonical wire-format name of a JWT algorithm. * * Returns `"none"`, `"HS256"`, `"RS256"`, etc. — the strings RFC 7518 * mandates inside t
jwt/jwt.c:303
↓ 15 callersFunctiontcp_close
* @brief Closes a TCP socket. * * This function closes the specified TCP socket. It handles platform-specific socket closure * for both Windows an
network/tcp.c:564
↓ 14 callersFunctionpostgres_query
* @brief Executes a SQL query on the PostgreSQL database and returns the result. * * @param pg Pointer to the Postgres structure representing the c
database/postgres.c:252
↓ 13 callersFunctionjsonsb_putc
Append a single byte. */
json/json.c:63
↓ 13 callersFunctionmemory_pool_destroy
string/std_string.c:267
↓ 12 callersFunctionjsonsb_append
Append `n` raw bytes. */
json/json.c:49
↓ 12 callersFunctionmatrix_multiply
* @brief Multiplies two matrices and returns the result. * * This function performs matrix multiplication between two matrices, `matrix1` and `matri
matrix/matrix.c:402
↓ 12 callersFunctionpostgres_get_last_error
* @brief Retrieves the last error message reported by the PostgreSQL connection. * * @param pg Pointer to the Postgres structure representing the c
database/postgres.c:447
↓ 12 callersFunctionrandom_random
* @brief This function generates a random double precision floating-point number * in the range [0, 1) using the standard library `rand()` funct
random/random.c:145
↓ 12 callersFunctionregex_match_free
Frees the per-match group buffers allocated by regex_match / regex_search / * regex_find_all. Safe to call with a zeroed or already-freed RegexMatch.
regex/std_regex.c:385
↓ 12 callersFunctionreset_global_stats
Helper function to reset global stats
sort/sort.c:48
↓ 12 callersFunctionvariant_destroy
* @brief Release all heap memory owned by @p v and reset it to NONE. * * Behavior by tag: * - NONE / primitives / POINTER: no allocation to free;
variant/variant.c:301
↓ 12 callersFunctionvector_deallocate
* @brief This function releases all the memory allocated for the vector, including the * contiguous element buffer and the vector structure itself. A
vector/vector.c:814
↓ 11 callersFunctionbitset_num_bytes
bitset/bitset.c:13
↓ 11 callersFunctioncl_dupn
malloc a NUL-terminated copy of s[0..n). */
network/http.c:2374
↓ 11 callersFunctionmap_begin
* @brief Returns an iterator to the first element in the map. * * This function returns an iterator pointing to the first element in the map, * whi
map/map.c:1246
↓ 11 callersFunctionmap_end
* @brief Returns an iterator to the position after the last element in the map. * * This function returns an iterator representing the end of the ma
map/map.c:1281
↓ 11 callersFunctionmap_iterator_increment
* @brief Advances the iterator to the next element in the map. * * This function increments the iterator to point to the next element in the map *
map/map.c:49
↓ 11 callersFunctionregex_buf_append
* @brief Internal: append @p n bytes of @p src to a growing buffer. * * Maintains a doubling capacity scheme so the amortized cost per byte * is O(
regex/std_regex.c:614
↓ 11 callersFunctionserial_is_open
* @brief Reports whether @p port has an active OS handle. * * Useful before calling any I/O function. Safe with NULL. */
serial_port/serial_port.c:44
↓ 10 callersFunctioncsv_row_create
* @brief Creates a new, empty CsvRow structure. * * This function allocates memory for a new CsvRow structure and initializes its members. * * @re
csv/csv.c:22
↓ 10 callersFunctionjsonsb_puts
Append a NUL-terminated string. */
json/json.c:58
↓ 10 callersFunctionlogp_lock
Lock / unlock the logger's internal recursive mutex. Both are no-ops when * the logger has no lock (mutex allocation failed at init), so the logger
log/log.c:23
↓ 10 callersFunctionmatrix_transpose
* @brief Transposes a given matrix. * * This function creates a new matrix with rows and columns swapped from the input matrix. * The elements are
matrix/matrix.c:3026
↓ 10 callersFunctionmemory_pool_allocate
string/std_string.c:237
↓ 10 callersFunctionnext_token
* @brief Advances the JSON parser state to the next token in the input string. * * This function skips over any whitespace and then identifies the
json/json.c:368
↓ 10 callersFunctionplot_color_hex
* @brief Build a PlotColor from a packed 32-bit value. * * Unpacks @p rgb_or_rgba as 0xAARRGGBB. The top byte is treated as * alpha, the next byte
plot/plot.c:912
↓ 10 callersFunctionprng_next32
Advance and return the next 32-bit value. Marsaglia xorshift32. */
random/random.c:25
↓ 10 callersFunctionset_begin
* @brief Returns an iterator to the first (smallest) element. * @param set The set (NULL yields the end iterator). * @return An iterator to the smal
set/set.c:1009
↓ 10 callersFunctionstatistics_mean
* @brief This function calculates the arithmetic mean (average) of the given data points. * * @param data Pointer to an array of doubles representin
statistics/statistics.c:324
↓ 10 callersFunctionvector_create
* @brief This function allocates memory for a new vector, initializes its internal structure, and * sets its initial capacity. The vector is created
vector/vector.c:83
↓ 10 callersFunctionvector_reserve
* @brief This function ensures that the vector has enough capacity to hold at least the specified * number of elements. If the current capacity is a
vector/vector.c:470
↓ 9 callersFunctioncsv_file_append_row
* @brief Appends a new row to a CSV file. * * This function adds a new row to the end of a CsvFile. If the file's capacity is * insufficient, it au
csv/csv.c:328
↓ 9 callersFunctionfnv1a
FNV-1a 64 reduced to size_t. */
variant/variant.c:976
↓ 9 callersFunctionhttp_method_to_string
* @brief Canonical wire-format name of an HttpMethod. * * Returns a static string ("GET", "POST", "PUT", "DELETE", "OPTIONS", * "HEAD", "PATCH") su
network/http.c:1736
↓ 9 callersFunctionplot_color
plot/plot.h:185
↓ 9 callersFunctionsecrets_token_bytes
* @brief Generate cryptographically secure random bytes. * * @param buffer Pointer to the byte array where random bytes will be stored. * @param s
secrets/secrets.c:29
↓ 9 callersFunctionset_iterator_increment
* @brief Advances an iterator to the in-order successor. * * After the largest element the iterator becomes the end iterator * (`node == NULL`). NU
set/set.c:933
↓ 8 callersFunctionalloc_sprintf
variant/variant.c:1062
↓ 8 callersFunctionclip_ieq
Case-insensitive whole-string equality. */
cli/cli.c:1906
↓ 8 callersFunctioncsvp_buf_append_n
Append `n` bytes of `s` to the growable, always-NUL-terminated buffer * (*buf, *cap, *len). Grows geometrically. Returns false on OOM. */
csv/csv.c:1511
↓ 8 callersFunctiondate_clone
* @brief Creates an independent deep copy of a Date object. * * The returned object owns its memory and must be freed by the caller via * @ref date
date/date.c:2187
↓ 8 callersFunctiondll_free_node
Free a node. Inline values live inside the node allocation and are released * with it; only an externally-owned (emplace) value is a separate block t
list/list.c:50
↓ 8 callersFunctiondup_cstr
variant/variant.c:15
↓ 8 callersFunctionezxml_free
free the memory allocated for the ezxml structure
xml/xml.c:909
↓ 8 callersFunctionis_effectively_zero
Function to check if a floating-point number is effectively zero
matrix/matrix.c:17
↓ 8 callersFunctionmap_insert
* @brief Inserts a key-value pair into the map. * * This function inserts a new key-value pair into the map. If the key already exists, its associat
map/map.c:735
↓ 8 callersFunctionmutex_destroy
* Destroys a mutex. * * This function releases any resources associated with the mutex. After calling * this function, the mutex must not be used u
concurrent/concurrent.c:98
↓ 8 callersFunctionpq_move
priority_queue/priority_queue.c:31
↓ 8 callersFunctiontcp_get_ssl
* @brief Retrieves the SSL object associated with a TCP socket. * * This function retrieves the SSL object that has been associated with a specified
network/tcp.c:1058
↓ 8 callersFunctionupdate_stats
Helper function to update stats
sort/sort.c:54
↓ 7 callersFunctionbitset_create
* @brief Creates a new Bitset with the specified number of bits. * * Allocates memory for a Bitset structure and its internal bit array, initializin
bitset/bitset.c:39
↓ 7 callersFunctioncall_once
concurrent/concurrent.c:1609
↓ 7 callersFunctioncondition_destroy
* Destroys a condition variable. * * Releases any resources associated with the condition variable. After calling * this function, the condition va
concurrent/concurrent.c:497
↓ 7 callersFunctionfile_reader_open
* @brief Opens a file for reading, based on the specified mode. * * This function opens a file for reading according to the specified `ReadMode`. *
file_io/file_reader.c:26
↓ 7 callersFunctionfile_writer_write
* @brief Writes data from a buffer to a file using the specified `FileWriter`. * * This function handles writing data to a file, with special handli
file_io/file_writer.c:289
↓ 7 callersFunctionfile_writer_write_fmt
* @brief Writes formatted data to the file, similar to `fprintf`. * * This function formats a string according to the specified format and writes it
file_io/file_writer.c:761
↓ 7 callersFunctionflist_free_node
Free a node (its value is inline, so a single free releases both). */
forward_list/forward_list.c:141
↓ 7 callersFunctionhashmap_end
* @brief Past-the-end iterator. Compares equal only to itself / an * iterator that has walked off the end. */
hashmap/hashmap.c:644
next →1–100 of 2,651, ranked by callers