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

Function gen_whenever

src/gpre/obj_cxx.cpp:3512–3541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3510//
3511
3512static 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//____________________________________________________________

Callers 3

OBJ_CXX_actionFunction · 0.70
gen_get_or_put_sliceFunction · 0.70
gen_sliceFunction · 0.70

Calls 1

alignFunction · 0.70

Tested by

no test coverage detected