| 2489 | // |
| 2490 | |
| 2491 | static void gen_get_segment( const act* action, int column) |
| 2492 | { |
| 2493 | ObjectNotImplemented(); |
| 2494 | const TEXT* pattern1 = |
| 2495 | "fbIStatus = %BH->getSegment(%V1, sizeof(%I2), %I2, &%I1);"; |
| 2496 | |
| 2497 | if (action->act_error && (action->act_type != ACT_blob_for)) |
| 2498 | begin(column); |
| 2499 | |
| 2500 | const blb* blob; |
| 2501 | if (action->act_flags & ACT_sql) |
| 2502 | blob = (blb*) action->act_request->req_blobs; |
| 2503 | else |
| 2504 | blob = (blb*) action->act_object; |
| 2505 | |
| 2506 | PAT args; |
| 2507 | args.pat_blob = blob; |
| 2508 | args.pat_vector1 = status_vector(action); |
| 2509 | args.pat_condition = !(action->act_error || (action->act_flags & ACT_sql)); |
| 2510 | args.pat_ident1 = blob->blb_len_ident; |
| 2511 | args.pat_ident2 = blob->blb_buff_ident; |
| 2512 | args.pat_string1 = global_status_name; |
| 2513 | PATTERN_expand((USHORT) column, pattern1, &args); |
| 2514 | |
| 2515 | if (action->act_flags & ACT_sql) |
| 2516 | { |
| 2517 | const ref* into = action->act_object; |
| 2518 | set_sqlcode(action, column); |
| 2519 | printa(column, "if (fbIStatus == Firebird::IStatus::RESULT_OK || fbIStatus == Firebird::IStatus::RESULT_SEGMENT)"); |
| 2520 | column += INDENT; |
| 2521 | begin(column); |
| 2522 | align(column); |
| 2523 | fprintf(gpreGlob.out_file, "isc_ftof (fb_%d, fb_%d, %s, fb_%d);", |
| 2524 | blob->blb_buff_ident, blob->blb_len_ident, |
| 2525 | into->ref_value, blob->blb_len_ident); |
| 2526 | if (into->ref_null_value) |
| 2527 | { |
| 2528 | align(column); |
| 2529 | fprintf(gpreGlob.out_file, "%s = fb_%d;", into->ref_null_value, blob->blb_len_ident); |
| 2530 | } |
| 2531 | endp(column); |
| 2532 | column -= INDENT; |
| 2533 | } |
| 2534 | } |
| 2535 | |
| 2536 | |
| 2537 | //____________________________________________________________ |
no test coverage detected