| 1200 | // |
| 1201 | |
| 1202 | static void gen_compile( const act* action, int column) |
| 1203 | { |
| 1204 | PAT args; |
| 1205 | const TEXT* pattern1 = |
| 1206 | "%RH = %DH->compileRequest(%V1, sizeof(%RI), %RI);"; |
| 1207 | const TEXT* pattern2 = "if (!%RH%IF && %S1%EN && %DH)"; |
| 1208 | |
| 1209 | const gpre_req* request = action->act_request; |
| 1210 | args.pat_request = request; |
| 1211 | const gpre_dbb* db = request->req_database; |
| 1212 | args.pat_database = db; |
| 1213 | args.pat_vector1 = status_vector(action); |
| 1214 | args.pat_string1 = request_trans(action, request); |
| 1215 | args.pat_condition = (gpreGlob.sw_auto && (action->act_error || (action->act_flags & ACT_sql))); |
| 1216 | |
| 1217 | if (gpreGlob.sw_auto) |
| 1218 | t_start_auto(action, request, status_vector(action), column, true); |
| 1219 | |
| 1220 | PATTERN_expand((USHORT) column, pattern2, &args); |
| 1221 | |
| 1222 | args.pat_condition = !(request->req_flags & REQ_exp_hand); |
| 1223 | args.pat_value1 = request->req_length; |
| 1224 | PATTERN_expand((USHORT) (column + INDENT), pattern1, &args); |
| 1225 | |
| 1226 | // If blobs are present, zero out all of the blob handles. After this |
| 1227 | // point, the handles are the user's responsibility |
| 1228 | |
| 1229 | const blb* blob = request->req_blobs; |
| 1230 | if (blob) |
| 1231 | { |
| 1232 | fprintf(gpreGlob.out_file, "\n"); |
| 1233 | align(column - INDENT); |
| 1234 | for (; blob; blob = blob->blb_next) |
| 1235 | fprintf(gpreGlob.out_file, "fb_%d = ", blob->blb_ident); |
| 1236 | fprintf(gpreGlob.out_file, "0;"); |
| 1237 | } |
| 1238 | } |
| 1239 | |
| 1240 | |
| 1241 | //____________________________________________________________ |
no test coverage detected