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

Function put_item

src/dsql/dsql.cpp:679–700  ·  view source on GitHub ↗

put_item @brief Put information item in output buffer if there is room, and return an updated pointer. If there isn't room for the item, indicate truncation and return NULL. @param item @param length @param string @param ptr @param end **/

Source from the content-addressed store, hash-verified

677
678 **/
679static UCHAR* put_item( UCHAR item,
680 const USHORT length,
681 const UCHAR* string,
682 UCHAR* ptr,
683 const UCHAR* const end)
684{
685 if (ptr + length + 3 >= end)
686 {
687 *ptr = isc_info_truncated;
688 return NULL;
689 }
690
691 *ptr++ = item;
692
693 *ptr++ = (UCHAR) length;
694 *ptr++ = length >> 8;
695
696 if (length)
697 memcpy(ptr, string, length);
698
699 return ptr + length;
700}
701
702
703// Return as UTF8

Callers 2

sql_infoFunction · 0.85
var_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected