MCPcopy Create free account
hub / github.com/audacity/audacity / decimalCollFunc

Function decimalCollFunc

lib-src/sqlite/shell.c:4917–4936  ·  view source on GitHub ↗

** Compare text in decimal order. */

Source from the content-addressed store, hash-verified

4915** Compare text in decimal order.
4916*/
4917static int decimalCollFunc(
4918 void *notUsed,
4919 int nKey1, const void *pKey1,
4920 int nKey2, const void *pKey2
4921){
4922 const unsigned char *zA = (const unsigned char*)pKey1;
4923 const unsigned char *zB = (const unsigned char*)pKey2;
4924 Decimal *pA = decimal_new(0, 0, nKey1, zA);
4925 Decimal *pB = decimal_new(0, 0, nKey2, zB);
4926 int rc;
4927 UNUSED_PARAMETER(notUsed);
4928 if( pA==0 || pB==0 ){
4929 rc = 0;
4930 }else{
4931 rc = decimal_cmp(pA, pB);
4932 }
4933 decimal_free(pA);
4934 decimal_free(pB);
4935 return rc;
4936}
4937
4938
4939/*

Callers

nothing calls this directly

Calls 3

decimal_newFunction · 0.85
decimal_cmpFunction · 0.85
decimal_freeFunction · 0.85

Tested by

no test coverage detected