| 5378 | // |
| 5379 | |
| 5380 | static swe* gen_whenever() |
| 5381 | { |
| 5382 | if (global_whenever_list) |
| 5383 | return global_whenever_list; |
| 5384 | |
| 5385 | global_whenever_list = NULL; // redundant |
| 5386 | swe* label = NULL; |
| 5387 | |
| 5388 | for (int i = 0; i < SWE_max; i++) |
| 5389 | { |
| 5390 | const swe* proto = global_whenever[i]; |
| 5391 | if (proto) |
| 5392 | { |
| 5393 | swe* prior = label; |
| 5394 | const USHORT len = proto->swe_length; |
| 5395 | label = (swe*) MSC_alloc(sizeof(swe) + len); |
| 5396 | label->swe_next = prior; |
| 5397 | label->swe_condition = proto->swe_condition; |
| 5398 | if (len) |
| 5399 | memcpy(label->swe_label, proto->swe_label, len); |
| 5400 | } |
| 5401 | } |
| 5402 | |
| 5403 | return label; |
| 5404 | } |
| 5405 | |
| 5406 | |
| 5407 | //____________________________________________________________ |
no test coverage detected