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

Function LD_setup_attributes

src/intl/ld.cpp:592–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590
591
592FB_DLL_EXPORT ULONG LD_setup_attributes(
593 const ASCII* textTypeName, const ASCII* charSetName, const ASCII* configInfo,
594 ULONG srcLen, const UCHAR* src, ULONG dstLen, UCHAR* dst)
595{
596 Firebird::string specificAttributes((const char*) src, srcLen);
597 Firebird::string newSpecificAttributes = specificAttributes;
598
599 if (!LCICU_setup_attributes(textTypeName, charSetName, configInfo,
600 specificAttributes, newSpecificAttributes))
601 {
602 return INTL_BAD_STR_LENGTH;
603 }
604
605 if (dstLen == 0)
606 return newSpecificAttributes.length();
607
608 if (newSpecificAttributes.length() <= dstLen)
609 {
610 memcpy(dst, newSpecificAttributes.begin(), newSpecificAttributes.length());
611 return newSpecificAttributes.length();
612 }
613
614 return INTL_BAD_STR_LENGTH;
615}
616
617
618FB_DLL_EXPORT void LD_version(USHORT* version)

Callers

nothing calls this directly

Calls 3

LCICU_setup_attributesFunction · 0.85
lengthMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected