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

Function BLB_gen_bpb

src/jrd/blb.cpp:549–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547
548
549void BLB_gen_bpb(SSHORT source, SSHORT target, UCHAR sourceCharset, UCHAR targetCharset, UCharBuffer& bpb)
550{
551 bpb.resize(15);
552
553 UCHAR* p = bpb.begin();
554 *p++ = isc_bpb_version1;
555
556 *p++ = isc_bpb_source_type;
557 *p++ = 2;
558 put_vax_short(p, source);
559 p += 2;
560 if (source == isc_blob_text)
561 {
562 *p++ = isc_bpb_source_interp;
563 *p++ = 1;
564 *p++ = sourceCharset;
565 }
566
567 *p++ = isc_bpb_target_type;
568 *p++ = 2;
569 put_vax_short(p, target);
570 p += 2;
571 if (target == isc_blob_text)
572 {
573 *p++ = isc_bpb_target_interp;
574 *p++ = 1;
575 *p++ = targetCharset;
576 }
577 fb_assert(static_cast<size_t>(p - bpb.begin()) <= bpb.getCount());
578
579 // set the array count to the number of bytes we used
580 bpb.shrink(p - bpb.begin());
581}
582
583
584void BLB_gen_bpb_from_descs(const dsc* fromDesc, const dsc* toDesc, UCharBuffer& bpb)

Callers 3

BLB_gen_bpb_from_descsFunction · 0.85
open2Method · 0.85
storeMetaDataBlobMethod · 0.85

Calls 5

put_vax_shortFunction · 0.85
resizeMethod · 0.45
beginMethod · 0.45
getCountMethod · 0.45
shrinkMethod · 0.45

Tested by

no test coverage detected