MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / QUAD_COMPARE

Function QUAD_COMPARE

src/jrd/cvt2.cpp:113–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111};
112
113static inline int QUAD_COMPARE(const SQUAD* arg1, const SQUAD* arg2)
114{
115/**************************************
116 *
117 * Q U A D _ c o m p a r e
118 *
119 **************************************
120 *
121 * Functional description
122 * Compare two descriptors. Return (-1, 0, 1) if a<b, a=b, or a>b.
123 *
124 **************************************/
125
126 if (((SLONG*) arg1)[HIGH_WORD] > ((SLONG*) arg2)[HIGH_WORD])
127 return 1;
128 if (((SLONG*) arg1)[HIGH_WORD] < ((SLONG*) arg2)[HIGH_WORD])
129 return -1;
130 if (((ULONG*) arg1)[LOW_WORD] > ((ULONG*) arg2)[LOW_WORD])
131 return 1;
132 if (((ULONG*) arg1)[LOW_WORD] < ((ULONG*) arg2)[LOW_WORD])
133 return -1;
134 return 0;
135}
136
137
138bool CVT2_get_binary_comparable_desc(dsc* result, const dsc* arg1, const dsc* arg2)

Callers 1

CVT2_compareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected