| 3510 | // |
| 3511 | |
| 3512 | static void gen_whenever( const swe* label, int column) |
| 3513 | { |
| 3514 | const TEXT* condition = NULL; |
| 3515 | |
| 3516 | while (label) |
| 3517 | { |
| 3518 | switch (label->swe_condition) |
| 3519 | { |
| 3520 | case SWE_error: |
| 3521 | condition = "SQLCODE < 0"; |
| 3522 | break; |
| 3523 | |
| 3524 | case SWE_warning: |
| 3525 | condition = "SQLCODE > 0 && SQLCODE != 100"; |
| 3526 | break; |
| 3527 | |
| 3528 | case SWE_not_found: |
| 3529 | condition = "SQLCODE == 100"; |
| 3530 | break; |
| 3531 | |
| 3532 | default: |
| 3533 | // condition undefined |
| 3534 | fb_assert(false); |
| 3535 | return; |
| 3536 | } |
| 3537 | align(column); |
| 3538 | fprintf(gpreGlob.out_file, "if (%s) goto %s;", condition, label->swe_label); |
| 3539 | label = label->swe_next; |
| 3540 | } |
| 3541 | } |
| 3542 | |
| 3543 | |
| 3544 | //____________________________________________________________ |
no test coverage detected