MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / ref_line_desc_name

Function ref_line_desc_name

tests/test_cypher.c:5648–5653  ·  view source on GitHub ↗

Columns 0 (name) and 1 (line): line descending, then name ascending. */

Source from the content-addressed store, hash-verified

5646
5647/* Columns 0 (name) and 1 (line): line descending, then name ascending. */
5648static int ref_line_desc_name(const cbm_cypher_result_t *r, int a, int b) {
5649 long la = strtol(r->rows[a][1], NULL, 10);
5650 long lb = strtol(r->rows[b][1], NULL, 10);
5651 int cmp = (lb > la) - (lb < la);
5652 return cmp != 0 ? cmp : strcmp(r->rows[a][0], r->rows[b][0]);
5653}
5654
5655static int ref_all_equal(const cbm_cypher_result_t *r, int a, int b) {
5656 (void)r;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected