MCPcopy Create free account

hub / github.com/KaisenAmin/c_std / functions

Functions2,651 in github.com/KaisenAmin/c_std

↓ 4 callersFunctionjwt_base64url_decode
Decode `in_len` base64url chars (with or without "=" padding; tolerates * stray "+" / "/" from buggy producers). Returns malloc'd bytes; length * in
jwt/jwt.c:139
↓ 4 callersFunctionjwt_ec_curve_matches_alg
* @brief Whether `pkey` is a curve whose order length matches `alg`. * * RFC 7518 §3.4 binds each ES* alg to a specific curve: * ES256 → P-256, E
jwt/jwt.c:412
↓ 4 callersFunctionlog_level_to_string
* @brief Returns the human-readable name of a log level. * * Maps a `LogLevel` to its uppercase string: `"DEBUG"`, `"INFO"`, `"WARN"`, * `"ERROR"`
log/log.c:62
↓ 4 callersFunctionmatrix_svd
* @brief Computes the (thin) singular value decomposition of a matrix. * * The C analogue of NumPy's `numpy.linalg.svd(M, full_matrices=False)`: fac
matrix/matrix.c:4609
↓ 4 callersFunctionprecedence
Returns the precedence of the operator. Higher numbers mean higher precedence. */
evalexpr/evalexpr.c:12
↓ 4 callersFunctionprint_indent
json/json.c:85
↓ 4 callersFunctionraw_header_value
Case-insensitive header lookup within a RAW header block (bytes [0,header_len), * i.e. up to and including the terminating CRLFCRLF). Copies the OWS-
network/http.c:129
↓ 4 callersFunctionrbmap_transplant
* @brief Replaces one subtree as a child of its parent with another subtree. * * This function is used during the deletion of a node in a Red-Black
map/map.c:327
↓ 4 callersFunctionrbset_compatible
@brief Internal: true when both sets are non-NULL and share an element size. */
set/set.c:1081
↓ 4 callersFunctionrbset_transplant
@brief Replaces the subtree rooted at `u` with the subtree rooted at `v`. */
set/set.c:286
↓ 4 callersFunctionresize_lines_if_needed
* @brief Resizes the line buffer if needed. * * This function checks if the current number of lines exceeds the allocated capacity. If the capacity
turtle/turtle.c:267
↓ 4 callersFunctionreverse
algorithm/algorithm.c:43
↓ 4 callersFunctions_append
Internal helper used by config_to_string: append @p s to a growing * heap buffer with geometric resize. Returns true on success. */
config/config.c:1451
↓ 4 callersFunctionset_create
* @brief Creates a new, empty ordered set. * * Every element later inserted is deep-copied into the set (the set owns * `elemSize` bytes per elemen
set/set.c:490
↓ 4 callersFunctionsort_mergesort
* @brief Stable, divide-and-conquer merge sort. * * Recursively splits the array in half, sorts each side, then merges. * **Stable.** Always O(n lo
sort/sort.c:456
↓ 4 callersFunctionsort_quicksort
* @brief In-place quicksort with Lomuto partitioning. * * Divides the array around a pivot (last element) and recurses on each side. * **Not stable
sort/sort.c:404
↓ 4 callersFunctionspanp_lex_compare
span/span.c:17
↓ 4 callersFunctionstatistics_sum_of_squares
helper functin for add square of each element in data
statistics/statistics.c:248
↓ 4 callersFunctionstring_push_back
* @brief Appends a single character to the end of the String object. * * This function appends the character `chItem` to the end of the String objec
string/std_string.c:996
↓ 4 callersFunctionstring_strndup
* @brief Duplicates up to `n` characters from a given string. * * This function creates a new string by duplicating the first `n` characters * from
string/std_string.c:3937
↓ 4 callersFunctiontcp_set_ssl
* @brief Associates an SSL object with a TCP socket. * * This function maps an SSL object to a specified TCP socket, which allows the socket to be u
network/tcp.c:1035
↓ 4 callersFunctiontcp_socket_create
* @brief Creates a TCP socket. * * This function creates a new TCP socket and stores it in the provided `sock` parameter. * It handles socket cre
network/tcp.c:175
↓ 4 callersFunctiontcp_wait_writable
* @brief Wait until the socket can accept a write, or time out. * * Blocks in `select()` until the socket is writable or @p timeout_ms elapses. * M
network/tcp.c:2338
↓ 4 callersFunctiontuplep_lex_compare
tuple/tuple.c:13
↓ 4 callersFunctionuuid_make_namespace
DNS / URL / OID / X.500 differ only in octet index 3 (10/11/12/14). */
uuid/uuid.c:519
↓ 4 callersFunctionuuid_set_version_variant
Stamp the version nibble (octet 6) and the RFC 4122 variant bits (octet 8). */
uuid/uuid.c:288
↓ 4 callersFunctionvecbuf_ensure_one_more
vector/vector.c:55
↓ 4 callersFunctionvecbuf_realloc_to
vector/vector.c:12
↓ 3 callersFunction_cthread_tss_cleanup
* This function performs cleanup for thread-specific storage (TSS) data at thread exit. * It iterates over all thread-specific data keys, invoking th
concurrent/concurrent.c:841
↓ 3 callersFunctionbitset_mask_tail
bitset/bitset.c:18
↓ 3 callersFunctionbitset_test
* @brief Tests whether a specific bit is set in the Bitset. * * Checks if the bit at the specified position in the Bitset is set to 1. * * @param
bitset/bitset.c:163
↓ 3 callersFunctioncfg_file_add_section
Append `sec` to the file's section array, growing it GEOMETRICALLY.*/
config/config.c:53
↓ 3 callersFunctionci_contains_chunked
True if `s` contains the token "chunked" (case-insensitive). Good enough to * detect `Transfer-Encoding: chunked` (possibly after other codings). */
network/http.c:90
↓ 3 callersFunctioncl_ci_eq
Case-insensitive ASCII equality (avoids non-portable strcasecmp). */
network/http.c:2737
↓ 3 callersFunctioncompute_extents
Compute the effective x/y min/max used for rendering. Each axis is * auto-scaled to the data unless a manual range was pinned with * plot_set_xlim /
plot/plot.c:46
↓ 3 callersFunctioncondition_broadcast
* Broadcasts to a condition variable. * * Unblocks all of the threads currently blocked on the specified condition variable. * If no threads are bl
concurrent/concurrent.c:591
↓ 3 callersFunctionconfig_deallocate
* @brief Frees all memory associated with the configuration structure. * * This function deallocates all memory used by the ConfigFile structure, in
config/config.c:551
↓ 3 callersFunctioncsvp_field_push
Push a single character onto the growable field buffer. */
csv/csv.c:1531
↓ 3 callersFunctiondate_day_of_week
* @brief Returns the day of the week for the given date. * * This function calculates the day of the week for the specified Date object. * The retu
date/date.c:1200
↓ 3 callersFunctiondate_is_equal
* @brief Compares two dates for equality. * * This function checks if two Date objects are equal by comparing their year, month, and day fields. *
date/date.c:1453
↓ 3 callersFunctiondate_is_leap_year_y
* @brief Checks if a given year is a leap year for a specific calendar type. * * This function determines if the provided year is a leap year accord
date/date.c:1573
↓ 3 callersFunctiondate_to_julian_day
* @brief Converts a Date object to a Julian Day Number. * * This function converts a given date in the Gregorian calendar to the corresponding Julia
date/date.c:1855
↓ 3 callersFunctiondeque_push_back
* @brief Inserts an item at the back of the deque. * * This function inserts a new item at the back of the deque. If necessary, it allocates a new b
deque/deque.c:170
↓ 3 callersFunctiondll_make_node
Allocate a detached node holding a COPY of `value` (itemSize bytes) stored * inline. next/prev are NULL; the caller links it in. Returns NULL on OOM.
list/list.c:21
↓ 3 callersFunctiondot_product
function to subtract vector projection of u onto v from u (u = u - proj_v(u))
matrix/matrix.c:121
↓ 3 callersFunctionencoding_is_utf8
* Validates a SINGLE UTF-8 sequence (one codepoint's worth of bytes: 1–4). * `length` must be in [1, 4]; values outside that range return false. * T
encoding/encoding.c:92
↓ 3 callersFunctioneval_rpn
* Evaluates an RPN (Reverse Polish Notation) expression. * * @param rpnTokens Array of tokens in RPN order. * @param numTokens Number of tokens in
evalexpr/evalexpr.c:317
↓ 3 callersFunctionezxml_toxml
Converts an ezxml structure back to xml. Returns a string of xml data that must be freed.
xml/xml.c:870
↓ 3 callersFunctionfactorial
Function to calculate factorial
matrix/matrix.c:88
↓ 3 callersFunctionfile_reader_get_size
* @brief Gets the size of the file associated with the `FileReader`. * * This function returns the size of the file in bytes. * * @param reader A
file_io/file_reader.c:309
↓ 3 callersFunctionforward_list_is_equal
* @brief Compares two ForwardLists to determine if they are equal. * * This function checks if the elements in `list1` are equal to those in `list2
forward_list/forward_list.c:1094
↓ 3 callersFunctionforward_list_pop_front
* @brief Adds a new element to the front of the ForwardList. * * This function creates a new node with the provided `value` and inserts it at the *
forward_list/forward_list.c:188
↓ 3 callersFunctionhashmap_insert
* @brief Insert or update. * * If @p key already exists: the existing value is replaced (the old * value is freed via `dealloc_value` if configured
hashmap/hashmap.c:922
↓ 3 callersFunctionhashmap_iterator_dereference
* @brief Dereference: return the entry the iterator points at. * * The returned `HashMapEntry` is a value copy of the (borrowed) key * and value po
hashmap/hashmap.c:836
↓ 3 callersFunctionhashmap_iterator_equal
* @brief Iterator equality: same map, same bucket, same node pointer. * * @return `false` if either argument is NULL. */
hashmap/hashmap.c:812
↓ 3 callersFunctionhashmap_iterator_increment
* @brief Advance @p it to the next entry. * * Walks the current bucket's chain first, then probes forward for the * next non-empty bucket. Becomes
hashmap/hashmap.c:686
↓ 3 callersFunctionhmap_next_prime
Helper function to find the next prime number
hashmap/hashmap.c:104
↓ 3 callersFunctionhp_hex_value
Hex digit (0-9, a-f, A-F) to integer value, or -1 on miss. */
network/http.c:1856
↓ 3 callersFunctionhp_recv_to
Blocking recv gated by a per-read IDLE timeout. We wait up to timeout_ms for * the socket to become readable using select() (via tcp_wait_readable) a
network/http.c:1335
↓ 3 callersFunctionhttp_response_get_header
* @brief Look up a header on a response by name (case-sensitive). * * Mirrors `http_get_header` but for the response side, so handlers can * inspec
network/http.c:2157
↓ 3 callersFunctionhttp_send_error
* @brief Shortcut: set the response status + body to the same error message. * * Equivalent to `http_set_status(res, code, message)` followed by *
network/http.c:1714
↓ 3 callersFunctionhttp_set_body
* @brief Attach a plain-text body to the response. * * Copies `body` and appends a `Content-Type: text/plain` header. Frees * any previous body so
network/http.c:753
↓ 3 callersFunctionjsonp_format_internal
* @brief Recursively formats a JSON element into a pretty-printed JSON-formatted string. * * This function processes different types of JSON elemen
json/json.c:1157
↓ 3 callersFunctionjsonp_serialize_internal
* @brief Internal function for serializing a JSON element into a JSON-formatted string. * * This function serializes different types of JSON elemen
json/json.c:1008
↓ 3 callersFunctionjwt_alg_is_rsa
* @brief Whether the algorithm is RSA-PKCS#1-v1.5 (RS256/384/512). * * Note this does NOT include the PS* family — those also use RSA keys * but ap
jwt/jwt.c:367
↓ 3 callersFunctionjwt_alg_uses_rsa_key
* @brief Whether the algorithm consumes an RSA-shaped key (RS* or PS*). * * Useful when deciding which key constructor to call from a JWK whose * `
jwt/jwt.c:391
↓ 3 callersFunctionjwt_base64url_encode
Encode `in_len` bytes of input to base64url. Output is malloc'd, NUL- * terminated, length returned in *out_len (excluding NUL). NULL on OOM. */
jwt/jwt.c:104
↓ 3 callersFunctionjwt_decode
* @brief Parse a compact-serialization JWT without verifying its signature. * * Returns a populated token whose header / payload / signature bytes /
jwt/jwt.c:1845
↓ 3 callersFunctionjwt_ec_raw_sig_len
* @brief Return the JOSE-mandated raw R||S signature length for an ES* alg. * * JWS represents ECDSA signatures as the fixed-size concatenation of t
jwt/jwt.c:223
↓ 3 callersFunctionjwt_obj_get_unix
jwt/jwt.c:2425
↓ 3 callersFunctionjwtp_json_num_to_int64
Safely convert a JSON number (double) to int64. Rejects NaN, +/-Inf, and any value outside the representable int64 range — a direct (int64_t) cast
jwt/jwt.c:1943
↓ 3 callersFunctionlist_is_equal
* @brief Checks if two lists are lexicographically equal. * * @param list1 Pointer to the first list. * @param list2 Pointer to the second list.
list/list.c:1312
↓ 3 callersFunctionlist_push_back
* @brief Adds a new element to the back of the list. * * This function creates a new node and adds it to the back of the list. The new node contains
list/list.c:511
↓ 3 callersFunctionmap_at
* @brief Retrieves the value associated with the specified key in the map. * * This function searches for a key in the map and returns the associate
map/map.c:802
↓ 3 callersFunctionmat_cmul
matrix/matrix.c:9061
↓ 3 callersFunctionmatch_route
Match a registered route template against a concrete request path. * Supports a single `{name}` placeholder that parses as an integer into * *id_out
network/http.c:301
↓ 3 callersFunctionmatrix_create_identity
* @brief Creates an identity matrix of size n x n. * * An identity matrix is a square matrix with 1's on the main diagonal and 0's elsewhere. * *
matrix/matrix.c:2514
↓ 3 callersFunctionmatrix_determinant
* @brief Calculates the determinant of a square matrix. * * This function computes the determinant of a square matrix using a recursive approach.
matrix/matrix.c:5112
↓ 3 callersFunctionmatrix_fill
* @brief Fills a matrix with a specified value. * * This function sets every element of the matrix to the provided value. * * @param matrix The ma
matrix/matrix.c:6674
↓ 3 callersFunctionparse_csv_line
csv/csv.c:198
↓ 3 callersFunctionparser_internal
* @brief Internal parser function to handle different JSON elements based on the current token. * * This function is called to parse the current el
json/json.c:802
↓ 3 callersFunctionprint_line
database/postgres.c:20
↓ 3 callersFunctionpriority_queue_is_equal
* @brief Byte-exact equality of the underlying heap storage. * * Two queues are equal iff they point to the same PriorityQueue OR * they have match
priority_queue/priority_queue.c:743
↓ 3 callersFunctionqbuf_compact
queue/queue.c:33
↓ 3 callersFunctionqbuf_lex_compare
queue/queue.c:47
↓ 3 callersFunctionqueue_is_equal
* @brief Byte-exact equality between two queues (NULL == NULL). * * Two queues are equal iff they point to the same Queue OR they have * matching s
queue/queue.c:453
↓ 3 callersFunctionrandom_index
Internal helper: random size_t in [0, n). Used by shuffle/choice/sample. */
random/random.c:41
↓ 3 callersFunctionrbmap_create_node
Allocate a node from the pool and initialise it (RED, no children). */
map/map.c:195
↓ 3 callersFunctionrbmap_insert_fixup
* @brief Restores Red-Black Tree properties after a node insertion. * * This function ensures that the Red-Black Tree properties are maintained afte
map/map.c:522
↓ 3 callersFunctionrbset_find_node
@brief BST lookup of the node equal to `element`, or NULL if absent. */
set/set.c:209
↓ 3 callersFunctionrbset_minimum
@brief Leftmost (minimum) node of a subtree, or NULL. */
set/set.c:185
↓ 3 callersFunctionregistry_hash
string/std_string.c:74
↓ 3 callersFunctionsha1_rol
uuid/uuid.c:169
↓ 3 callersFunctionsort_init_stats
* @brief Zero-initialize a SortStats counter structure. * * Resets `comparisons`, `swaps`, `recursive_calls`, and `execution_time_ms` * to zero and
sort/sort.c:25
↓ 3 callersFunctionstack_is_equal
@brief true if both stacks hold the same bytes (NULL == NULL). */
stack/stack.c:230
↓ 3 callersFunctionstatistics_sumprod
statistics/statistics.c:234
↓ 3 callersFunctionstring_length_cstr
* @brief This function returns the length of the given C-string `str`, excluding the * null terminator. * * @param str The C-string whose length is
string/std_string.c:3778
↓ 3 callersFunctiontcp_connect_timeout
* @brief Connect with a bounded timeout, so a connect never hangs. * * A drop-in alternative to `tcp_connect` that refuses to block longer than * @
network/tcp.c:2429
↓ 3 callersFunctiontcp_recv
* @brief Receives data from a TCP socket. * * This function attempts to receive data from the specified TCP socket into the provided buffer. * The
network/tcp.c:510
↓ 3 callersFunctiontime_is_equal
* @brief This function checks if two Time objects represent the same time. It returns true if the hour, minute, * second, and millisecond values of
time/std_time.c:534
← previousnext →201–300 of 2,651, ranked by callers