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

Function put_vax_long

src/include/memory_routines.h:152–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152inline UCHAR put_vax_long(UCHAR* p, SLONG value)
153{
154/**************************************
155 *
156 * p u t _ v a x _ l o n g
157 *
158 **************************************
159 *
160 * Functional description
161 * Store one signed long int as
162 * four chars in VAX format
163 *
164 **************************************/
165#ifndef WORDS_BIGENDIAN
166 // little-endian
167 memcpy(p, &value, sizeof(SLONG));
168#else
169 // big-endian
170 union
171 {
172 SLONG n;
173 UCHAR c[4];
174 } temp;
175
176 temp.n = value;
177
178 p[0] = temp.c[3];
179 p[1] = temp.c[2];
180 p[2] = temp.c[1];
181 p[3] = temp.c[0];
182#endif
183
184 return sizeof(value);
185}
186
187inline UCHAR put_vax_int64(UCHAR* p, SINT64 value)
188{

Callers 7

reconnectFunction · 0.85
svc_api_gbakFunction · 0.85
sql_infoFunction · 0.85
var_infoFunction · 0.85
INF_convertFunction · 0.85
putInfoItemIntFunction · 0.85
fillFromCacheMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected