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

Function gen_database

src/gpre/languages/ada.cpp:1132–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1130//
1131
1132static void gen_database(int column)
1133{
1134 if (first_flag)
1135 return;
1136 first_flag = true;
1137
1138 fprintf(gpreGlob.out_file, "\n----- GPRE Preprocessor Definitions -----\n");
1139
1140 gpre_req* request;
1141 for (request = gpreGlob.requests; request; request = request->req_next)
1142 {
1143 if (request->req_flags & REQ_local)
1144 continue;
1145 for (const gpre_port* port = request->req_ports; port; port = port->por_next)
1146 make_port(port, column);
1147 }
1148 fprintf(gpreGlob.out_file, "\n");
1149 for (request = gpreGlob.requests; request; request = request->req_routine)
1150 {
1151 if (request->req_flags & REQ_local)
1152 continue;
1153 for (const gpre_port* port = request->req_ports; port; port = port->por_next)
1154 printa(column, "isc_%d\t: isc_%dt;\t\t\t-- message --", port->por_ident, port->por_ident);
1155
1156 for (const blb* blob = request->req_blobs; blob; blob = blob->blb_next)
1157 {
1158 printa(column, "isc_%d\t: firebird.blob_handle;\t-- blob handle --", blob->blb_ident);
1159 SSHORT blob_subtype = blob->blb_const_to_type;
1160 if (!blob_subtype)
1161 {
1162 const ref* reference = blob->blb_reference;
1163 if (reference)
1164 {
1165 const gpre_fld* field = reference->ref_field;
1166 if (field)
1167 blob_subtype = field->fld_sub_type;
1168 }
1169 }
1170 if (blob_subtype != 0 && blob_subtype != 1)
1171 printa(column, "isc_%d\t: %s (1 .. %d);\t\t-- blob segment --",
1172 blob->blb_buff_ident, BYTE_VECTOR_DCL, blob->blb_seg_length);
1173 else
1174 printa(column, "isc_%d\t: string (1 .. %d);\t\t-- blob segment --",
1175 blob->blb_buff_ident, blob->blb_seg_length);
1176 printa(column, "isc_%d\t: %s;\t\t-- segment length --", blob->blb_len_ident, USHORT_DCL);
1177 }
1178 }
1179
1180 // generate event parameter block for each event in module
1181
1182 USHORT max_count = 0;
1183 for (gpre_lls* stack_ptr = gpreGlob.events; stack_ptr; stack_ptr = stack_ptr->lls_next)
1184 {
1185 const USHORT event_count = gen_event_block((const act*) stack_ptr->lls_object);
1186 max_count = MAX(event_count, max_count);
1187 }
1188
1189 if (max_count)

Callers 1

ADA_actionFunction · 0.70

Calls 6

make_portFunction · 0.70
printaFunction · 0.70
gen_event_blockFunction · 0.70
gen_requestFunction · 0.70
make_array_declarationFunction · 0.70
gen_tpbFunction · 0.70

Tested by

no test coverage detected