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

Function put_numeric

src/burp/mvol.cpp:1733–1746  ·  view source on GitHub ↗

____________________________________________________________ Write a numeric value as an attribute. The number is represented low byte first, high byte last, as in VAX.

Source from the content-addressed store, hash-verified

1731// low byte first, high byte last, as in VAX.
1732//
1733static void put_numeric( SCHAR attribute, int value)
1734{
1735 BurpGlobals* tdgbl = BurpGlobals::getSpecific();
1736
1737 const ULONG vax_value = gds__vax_integer(reinterpret_cast<const UCHAR*>(&value), sizeof(value));
1738 const UCHAR* p = (UCHAR*) &vax_value;
1739
1740 put(tdgbl, attribute);
1741 put(tdgbl, sizeof(vax_value));
1742
1743 for (USHORT i = 0; i < sizeof(vax_value); i++) {
1744 put(tdgbl, *p++);
1745 }
1746}
1747
1748
1749//____________________________________________________________

Callers 1

write_headerFunction · 0.70

Calls 1

putFunction · 0.70

Tested by

no test coverage detected