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

Function asgn_from

src/gpre/int_cxx.cpp:194–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192//
193
194static void asgn_from( ref* reference, int column)
195{
196 TEXT variable[MAX_REF_SIZE];
197 TEXT temp[MAX_REF_SIZE];
198
199 for (; reference; reference = reference->ref_next)
200 {
201 const gpre_fld* field = reference->ref_field;
202 align(column);
203 gen_name(variable, reference);
204 const TEXT* value;
205 if (reference->ref_source) {
206 value = gen_name(temp, reference->ref_source);
207 }
208 else {
209 value = reference->ref_value;
210 }
211
212 // To avoid chopping off a double byte kanji character in between
213 // the two bytes, generate calls to gds__ftof2 gds$_vtof2,
214 // gds$_vtov2 and jrd_vtof2 wherever necessary
215
216 if (!field || field->fld_dtype == dtype_text)
217 fprintf(gpreGlob.out_file, VTO_CALL, JRD_VTOF, value, variable,
218 field ? field->fld_length : 0);
219 else if (field->fld_dtype == dtype_cstring)
220 fprintf(gpreGlob.out_file, VTO_CALL, GDS_VTOV, value, variable, field->fld_length);
221 else
222 fprintf(gpreGlob.out_file, "%s = %s;", variable, value);
223 }
224}
225
226
227//____________________________________________________________

Callers 1

gen_s_startFunction · 0.70

Calls 2

alignFunction · 0.70
gen_nameFunction · 0.70

Tested by

no test coverage detected