MCPcopy Create free account
hub / github.com/coreutils/coreutils / cmp

Function cmp

src/seq.c:437–441  ·  view source on GitHub ↗

Compare A and B with lengths A_LEN and B_LEN. A and B are integers represented by nonempty arrays of digits without redundant leading '0'. Return negative if A < B, 0 if A = B, positive if A > B. */

Source from the content-addressed store, hash-verified

435 represented by nonempty arrays of digits without redundant leading '0'.
436 Return negative if A < B, 0 if A = B, positive if A > B. */
437static int
438cmp (char const *a, idx_t a_len, char const *b, idx_t b_len)
439{
440 return a_len == b_len ? memcmp (a, b, a_len) : _GL_CMP (a_len, b_len);
441}
442
443/* Trim leading 0's from S, but if S is all 0's, leave one.
444 Return a pointer to the trimmed string. */

Callers 10

dirfirst_checkFunction · 0.85
cmp_ctimeFunction · 0.85
cmp_mtimeFunction · 0.85
cmp_atimeFunction · 0.85
cmp_btimeFunction · 0.85
cmp_sizeFunction · 0.85
cmp_nameFunction · 0.85
cmp_extensionFunction · 0.85
cmp_widthFunction · 0.85
seq_fastFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected