Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KaisenAmin/c_std
/ functions
Functions
2,651 in github.com/KaisenAmin/c_std
⨍
Functions
2,651
◇
Types & classes
138
↓ 2 callers
Function
mat_jacobi
* Cyclic Jacobi eigenvalue algorithm for a real symmetric matrix. * `A` is n x n symmetric; on success `eigvals` (length n) holds the eigenvalues *
matrix/matrix.c:4415
↓ 2 callers
Function
mat_swap_cols
Swaps columns `i` and `j` of an n-column matrix stored row-major. */
matrix/matrix.c:4488
↓ 2 callers
Function
matrix_create_submatrix
* @brief Creates a submatrix by excluding a specified row and column. * * This function generates a submatrix from the input matrix by removing the
matrix/matrix.c:5204
↓ 2 callers
Function
matrix_inverse
* @brief Computes the inverse of a square matrix. * * This function calculates the inverse of a square matrix by first computing its determinant. *
matrix/matrix.c:5296
↓ 2 callers
Function
matrix_is_equal
* @brief Checks if two matrices are equal. * * Two matrices are considered equal if they have the same dimensions and their corresponding elements a
matrix/matrix.c:2700
↓ 2 callers
Function
matrix_is_symmetric
* @brief Checks if a matrix is symmetric. * * A matrix is symmetric if it is equal to its transpose, meaning the element at position * (i, j) is e
matrix/matrix.c:4965
↓ 2 callers
Function
matrix_mean
* @brief Computes the arithmetic mean of every element of a matrix. * * The C analogue of NumPy's `numpy.mean(M)`: returns the sum of all elements
matrix/matrix.c:6881
↓ 2 callers
Function
matrix_swap_rows
* @brief Swaps two rows of a matrix. * * This function swaps the elements of two rows in the given matrix. * If the matrix pointer is NULL or the r
matrix/matrix.c:169
↓ 2 callers
Function
md5_transform
uuid/uuid.c:42
↓ 2 callers
Function
parse_array
* @brief Parses a JSON array from the input string. * * This function assumes that the current token is the start of a JSON array (`[`). * It cont
json/json.c:457
↓ 2 callers
Function
parse_object
* @brief Parses a JSON object from the input string. * * This function assumes that the current token is the start of a JSON object ('{'). * It p
json/json.c:833
↓ 2 callers
Function
parse_string
* @brief Parses a JSON string from the input string. * * This function assumes that the current token is the start of a JSON string (`"`). * It re
json/json.c:513
↓ 2 callers
Function
persian_days_in_month
date/date.c:772
↓ 2 callers
Function
plot_set_axis_color
* @brief Convenience setter for the axis (and frame) colour. * * The axis colour is reused as the colour of the x/y axis lines, the * plot title, b
plot/plot.c:1195
↓ 2 callers
Function
plot_set_background_color
* @brief Convenience setter for the background colour. * * Overrides the colour passed to ClearBackground() at the start of * every frame. Useful w
plot/plot.c:1153
↓ 2 callers
Function
plot_set_grid_color
* @brief Convenience setter for the grid line colour. * * Changes the colour of the 11x11 grid drawn behind the plotted * series. Has no effect whe
plot/plot.c:1173
↓ 2 callers
Function
plot_set_legend_colors
* @brief Convenience setter for the legend background + text colours. * * Updates the legend's fill colour and the colour of its label text in * on
plot/plot.c:1217
↓ 2 callers
Function
pq_sift_down
priority_queue/priority_queue.c:114
↓ 2 callers
Function
pq_sift_up
priority_queue/priority_queue.c:61
↓ 2 callers
Function
pq_swap
priority_queue/priority_queue.c:43
↓ 2 callers
Function
priority_queue_deallocate
* @brief Destroy the priority queue and release all memory it owns. * * Frees both the underlying vector AND the PriorityQueue header. * NULL-safe.
priority_queue/priority_queue.c:353
↓ 2 callers
Function
queue_deallocate
* @brief Destroy the queue and release all memory it owns. * * Frees both the underlying vector AND the Queue header itself. NULL-safe. * * @param
queue/queue.c:213
↓ 2 callers
Function
random_gamma
* @brief Generates a random double number based on the Gamma distribution. * * @param shape The shape parameter of the distribution (must be greater
random/random.c:717
↓ 2 callers
Function
random_gauss
* @brief Generates a random double number based on the Gaussian (normal) distribution. * * @param mean The mean (mu) of the distribution. * @param
random/random.c:614
↓ 2 callers
Function
rbmap_dealloc_live
Walk the LIVE nodes (recursion depth = tree height = O(log n)) and run the * optional key/value deallocators. Node memory itself is NOT freed here —
map/map.c:496
↓ 2 callers
Function
rbmap_pool_destroy
Release every slab (used on clear / deallocate). O(number of slabs). */
map/map.c:182
↓ 2 callers
Function
rbmap_pool_free
Return a node's slot to the free-list for reuse (used on erase / dup). */
map/map.c:176
↓ 2 callers
Function
rbset_maximum
@brief Rightmost (maximum) node of a subtree, or NULL. */
set/set.c:197
↓ 2 callers
Function
rbset_pool_alloc
set/set.c:63
↓ 2 callers
Function
rbset_pool_destroy
Release every slab (used on clear / deallocate). O(number of slabs). */
set/set.c:113
↓ 2 callers
Function
regex_replace_impl
* @brief Internal: shared engine for regex_replace and regex_replace_first. * * @param max_replacements -1 means "replace all". Any other non-negati
regex/std_regex.c:644
↓ 2 callers
Function
regex_search
* @brief Searches for the given regex pattern in the provided string. * * @param regex The compiled regex object. * @param string The string to se
regex/std_regex.c:305
↓ 2 callers
Function
registry_add
string/std_string.c:114
↓ 2 callers
Function
registry_resize
string/std_string.c:83
↓ 2 callers
Function
render_plot
Draw the plot contents into the currently-bound render target. * Shared by plot_draw (live window) and plot_export_image (offscreen). */
plot/plot.c:97
↓ 2 callers
Function
secrets_uniform_size
* @brief Internal: draw an unbiased, uniformly-distributed size_t in [0, n). * * Uses rejection sampling against the largest exact multiple of @p n
secrets/secrets.c:102
↓ 2 callers
Function
serialize_string
* @brief Serializes a string value into a JSON-formatted string. * * This function takes a string and appends it to a String object in JSON format,
json/json.c:909
↓ 2 callers
Function
sha1_transform
uuid/uuid.c:174
↓ 2 callers
Function
shift_left
* Shift the byte to the left by the specified offset * This function calls shift_right with the negative of the offset, * effectively performing a l
encoding/encoding.c:665
↓ 2 callers
Function
sort_build_heap
* @brief Convert an arbitrary array into a max-heap in place (Floyd's method). * * Runs in O(n) by heapifying from the last non-leaf node downward.
sort/sort.c:1355
↓ 2 callers
Function
sort_heapsort
* @brief In-place heap sort. * * Builds a max-heap then repeatedly extracts the root to the end of the * array. **Not stable.** Worst-case guarante
sort/sort.c:492
↓ 2 callers
Function
sort_introspective_optimized
* @brief Introspective sort variant with cutoffs and depth-limited recursion. * * - Arrays of ≤16 elements: insertion sort. * - Otherwise: median-o
sort/sort.c:1517
↓ 2 callers
Function
sort_partition
* @brief Lomuto partition around `array[right]` as pivot. * * Reorders `array[left..right]` so that elements `<=` pivot come first and * elements `
sort/sort.c:1217
↓ 2 callers
Function
sort_quicksort_optimized
* @brief Quicksort with median-of-three pivot selection and small-array cutoff. * * For arrays of ≤10 elements, falls back to insertion sort (which
sort/sort.c:1439
↓ 2 callers
Function
sort_shell
* @brief Shell sort with Knuth's halving gap sequence. * * Generalized insertion sort: starts with a large gap (`size/2`), halves it * each pass, a
sort/sort.c:628
↓ 2 callers
Function
srt_siftdown
Sift the element at index i down a max-heap of n elements. */
algorithm/algorithm.c:79
↓ 2 callers
Function
stack_deallocate
* @brief Destroy a stack and release all underlying memory. * Safe to call with NULL (no-op). */
stack/stack.c:131
↓ 2 callers
Function
statistics_compare_elements
* @brief Compares two elements based on their memory content using memcmp. * This function is useful for comparing elements of different types in ge
statistics/statistics.c:115
↓ 2 callers
Function
statistics_rank_data
this helper function function has been corrected to handle ties by averaging the ranks of tied values. Returns true on success, false on allocation fa
statistics/statistics.c:193
↓ 2 callers
Function
statp_sorted_copy
Allocate an ascending-sorted copy of `data` (n doubles); caller frees. Distinct `statp_` prefix from the public `statistics_` API. NULL on OOM. */
statistics/statistics.c:559
↓ 2 callers
Function
string_assign
* @brief Assigns a new string to the String object, replacing its current contents. * * This function replaces the current contents of the String ob
string/std_string.c:1044
↓ 2 callers
Function
string_c_str
* @brief Returns a constant C-string representation of the string. * * This function returns a constant pointer to the character array managed by th
string/std_string.c:1783
↓ 2 callers
Function
tcp_init
* @brief Initializes the network API (Windows only). * * This function initializes the Winsock library on Windows systems. On Unix-like systems,
network/tcp.c:388
↓ 2 callers
Function
tcp_send_all
* @brief Send EXACTLY `len` bytes, looping over partial writes. * * `tcp_send` (and the underlying `send()`) is allowed to return having * written
network/tcp.c:2187
↓ 2 callers
Function
tcp_set_non_blocking
* @brief Sets the non-blocking mode for a TCP socket. * * This function sets or unsets the non-blocking mode on the given socket. In non-blocking mo
network/tcp.c:793
↓ 2 callers
Function
tcp_ssl_close
* @brief Closes an SSL-encrypted TCP connection. * * This function initiates the SSL/TLS shutdown sequence for the specified socket, frees the assoc
network/tcp.c:1584
↓ 2 callers
Function
tcp_ssl_connect
* @brief Initiates an SSL/TLS connection to a remote host. * * This function establishes a secure SSL/TLS connection to a remote host on the given s
network/tcp.c:1421
↓ 2 callers
Function
tcp_ssl_get_verify_result
* @brief Verification result of the peer certificate chain after a handshake. * @param socket A TCP socket with an active TLS session. * @return X50
network/tcp.c:1259
↓ 2 callers
Function
tcp_ssl_init_client
* @brief Initialize a client-side SSL context (TLS_client_method). * * Unlike tcp_ssl_init (which builds a server context and requires a cert/key),
network/tcp.c:1224
↓ 2 callers
Function
tcp_wait_readable
* @brief Wait until the socket has data ready to read, or time out. * * Blocks in `select()` until the socket is readable (data has arrived, or the
network/tcp.c:2319
↓ 2 callers
Function
tcp_wait_ready
Wait until `socket` is ready for read (want_write=false) or write * (want_write=true), or until `timeout_ms` elapses. timeout_ms < 0 blocks * indefi
network/tcp.c:2273
↓ 2 callers
Function
thread_pool_destroy
* @brief Stop all workers, join them, and free all pool resources. * * Any tasks still queued (not yet picked up by a worker) are discarded. * In-f
concurrent/thread_pool.c:204
↓ 2 callers
Function
time_is_less_than
* @brief This function checks if the first Time object (`lhs`) represents an earlier time than the second Time object (`rhs`). * It compares the hou
time/std_time.c:562
↓ 2 callers
Function
turtle_push_text
Internal: append a text label to the turtle's recorded labels. */
turtle/turtle.c:1458
↓ 2 callers
Function
turtle_set_heading
* @brief Sets the turtle's heading to a specified angle. * * This function sets the direction in which the turtle is facing to the given angle in d
turtle/turtle.c:906
↓ 2 callers
Function
variant_clone
* @brief Deep-copy @p src into a brand-new Variant. * * For STRING and CUSTOM variants the underlying storage is duplicated * (using `info->copy` f
variant/variant.c:341
↓ 2 callers
Function
vector_is_equal
* @brief This function compares two vectors to determine if they are equal in size and content. * The comparison is performed element by element, an
vector/vector.c:133
↓ 2 callers
Function
vrt_is_trivial
True when a variant tag's payload lives entirely inside the inline union (no * owned heap storage), so a clone is simply a struct copy and a destroy
variant/variant.c:66
↓ 2 callers
Function
xml__doc_unregister
Remove `node` from its owning document's registry (if any) so that a * subsequent xml_deallocate_document does not free the wrapper a second * time.
xml/xml.c:1233
↓ 2 callers
Function
xml_copy_text
* @brief Copies the provided text to a new dynamically allocated memory block. * * This function duplicates a given text string by allocating new m
xml/xml.c:1800
↓ 2 callers
Function
xml_count_descendants_by_tag_ez
Recursive helper: count every descendant (NOT including @p node * itself) whose tag matches @p tag_name. */
xml/xml.c:2486
↓ 2 callers
Function
xml_free_attributes
* @brief Free a list of attributes returned by xml_get_attributes. * * Releases every node in the singly-linked list along with the copied * name/v
xml/xml.c:2550
↓ 2 callers
Function
xor_encrypt_decrypt
config/config.c:40
↓ 1 callers
Function
ConvertUTF16toUTF8
* This function converts a UTF-16 encoded string to UTF-8. It handles surrogate pairs by converting * them to their corresponding UTF-32 representat
encoding/encoding.c:177
↓ 1 callers
Function
ConvertUTF32toUTF8
* This function converts a UTF-32 encoded string to UTF-8. It processes each UTF-32 character, * determining how many bytes are needed in UTF-8, and
encoding/encoding.c:283
↓ 1 callers
Function
ConvertUTF8toUTF16
* This function converts a UTF-8 encoded string to UTF-16. It iterates through the source UTF-8 string, * decodes each character, and checks for any
encoding/encoding.c:365
↓ 1 callers
Function
ConvertUTF8toUTF32
* This function converts a UTF-8 encoded string to UTF-32. It processes the UTF-8 input by decoding each character, * verifying its legality, and th
encoding/encoding.c:475
↓ 1 callers
Function
add_memory_record
* @brief Append a record to the live-allocation tracking list. * * Used by `unittest_malloc`. If the tracking node itself fails to * allocate, `tot
unittest/unittest.c:200
↓ 1 callers
Function
algorithm_lower_bound
* @brief Finds the first position in a sorted range where a value can be inserted without violating the order. * * This function performs a binary s
algorithm/algorithm.c:891
↓ 1 callers
Function
algorithm_sort
* @brief Sorts an array using a non-stable quicksort algorithm. * * @param base Pointer to the start of the array. * @param num Number of elements
algorithm/algorithm.c:244
↓ 1 callers
Function
algorithm_swap
* @brief Swaps the values of two elements. * * @param a Pointer to the first element. * @param b Pointer to the second element. * @param size Size
algorithm/algorithm.c:1489
↓ 1 callers
Function
algorithm_upper_bound
* @brief Finds the first position in a sorted range where a value is greater than a specified value. * * This function performs a binary search on a
algorithm/algorithm.c:930
↓ 1 callers
Function
base91_decode_value
* This function finds the index of a character within the BASE91_ALPHABET array, which is used for Base91 decoding. * If the character is not found,
encoding/encoding.c:70
↓ 1 callers
Function
bigfloat_deallocate
* @brief Frees the memory of a BigFloat. * @param bf Pointer to the BigFloat to deallocate. */
bigfloat/bigfloat.c:73
↓ 1 callers
Function
bigfloat_is_negative
* @brief Checks if a BigFloat is negative. * @param a Pointer to the BigFloat. * @return `true` if the BigFloat is negative, `false` otherwise. */
bigfloat/bigfloat.c:391
↓ 1 callers
Function
bigint_is_zero
* @brief Checks if a BigInt is zero. * * Determines whether the BigInt is equal to zero. * * @param bi Pointer to the BigInt to check. * @return
bigint/bigint.c:370
↓ 1 callers
Function
bigint_to_string
* @brief Converts a BigInt to a decimal string. * * Converts the internal GMP value to a null-terminated decimal string. * The returned string is a
bigint/bigint.c:135
↓ 1 callers
Function
binomial_coefficient
Function to calculate binomial coefficient
matrix/matrix.c:62
↓ 1 callers
Function
bisect_left
* @brief This function performs a binary search to find the index where a value x should be inserted in the * sorted array data while maintaining th
statistics/statistics.c:19
↓ 1 callers
Function
bisect_right
* @brief Similar to bisect_left, but it returns the index where x should * be inserted to the right of existing elements that are equal to x. This i
statistics/statistics.c:48
↓ 1 callers
Function
bitset_any
* @brief Checks if any bit in the Bitset is set. * * Returns true if at least one bit in the Bitset is set to 1. * * @param bs Pointer to the Bits
bitset/bitset.c:352
↓ 1 callers
Function
bitset_is_equal
* @brief Compares two Bitsets for equality. * * This function checks if two Bitsets are identical in size and bit values. * It returns true if the
bitset/bitset.c:763
↓ 1 callers
Function
check_virtualization_in_cpuinfo
Linux specific virtualization detection remains the same
sysinfo/sysinfo.c:1438
↓ 1 callers
Function
check_virtualization_with_systemd
sysinfo/sysinfo.c:1462
↓ 1 callers
Function
cl_build_request
Serialize the request line + headers + body into `b`. Host and * Content-Length are generated; any user-supplied Host/Content-Length/ * Connection h
network/http.c:2833
↓ 1 callers
Function
cl_read_response
Read a complete response off the socket into a contiguous "headers\r\n\r\n + * de-framed body" buffer. Body framing: no body for HEAD / 1xx / 204 / 3
network/http.c:2914
↓ 1 callers
Function
cl_resolve_redirect
Build the absolute URL a Location header redirects to, relative to `base`. * Handles absolute (scheme://...), root-relative (/path) and relative path
network/http.c:3131
↓ 1 callers
Function
cl_send_all
Send the whole buffer, SSL-aware, bounded by a writable-timeout per chunk. */
network/http.c:2780
↓ 1 callers
Function
cl_tls_client_handshake
Establish client TLS on an already-connected socket (SNI = host). When * !insecure, require the peer certificate chain to verify. */
network/http.c:2811
↓ 1 callers
Function
cli_register_option
* @brief Registers a new option with the CLI parser. * * This function adds a new option to the CLI parser, allowing it to be recognized and process
cli/cli.c:472
← previous
next →
401–500 of 2,651, ranked by callers