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