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

Function asgn_to_proc

src/gpre/obj_cxx.cpp:712–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

710//
711
712static void asgn_to_proc(const ref* reference, int column)
713{
714 char s[MAX_REF_SIZE];
715
716 for (; reference; reference = reference->ref_next)
717 {
718 if (!reference->ref_value)
719 continue;
720 const gpre_fld* field = reference->ref_field;
721 gen_name(s, reference, true);
722 align(column);
723
724 if (field->fld_dtype > dtype_cstring)
725 fprintf(gpreGlob.out_file, "%s = %s;", reference->ref_value, s);
726 else if (field->fld_sub_type == 1 && field->fld_length == 1)
727 fprintf(gpreGlob.out_file, "%s = %s;", reference->ref_value, s);
728 else if (field->fld_flags & FLD_dbkey)
729 fprintf(gpreGlob.out_file, "isc_ftof (%s, %d, %s, %d);",
730 s, field->fld_length, reference->ref_value, field->fld_length);
731 else if (!gpreGlob.sw_cstring || field->fld_sub_type == 1)
732 fprintf(gpreGlob.out_file, "isc_ftof (%s, %d, %s, sizeof(%s));",
733 s, field->fld_length, reference->ref_value, reference->ref_value);
734 else
735 fprintf(gpreGlob.out_file, isLangCpp(gpreGlob.sw_language) ?
736 "isc_vtov ((const char*) %s, (char*) %s, sizeof(%s));" :
737 "isc_vtov ((char*) %s, (char*) %s, sizeof(%s));",
738 s, reference->ref_value, reference->ref_value);
739 }
740}
741
742
743//____________________________________________________________

Callers 1

gen_procedureFunction · 0.70

Calls 3

isLangCppFunction · 0.85
gen_nameFunction · 0.70
alignFunction · 0.70

Tested by

no test coverage detected