Set up the selected section pointer to correspond to that of the copied template */
| 545 | /* Set up the selected section pointer to correspond to |
| 546 | that of the copied template */ |
| 547 | static void tpl_adjust_selection(tpl_t* tpl, |
| 548 | const tpl_t* srctpl, |
| 549 | tpl_tcell_t* sec, |
| 550 | const tpl_tcell_t* srcsec) |
| 551 | { |
| 552 | const tpl_tcell_t *sec1 = srcsec; |
| 553 | tpl_tcell_t *sec2 = sec; |
| 554 | |
| 555 | if (srctpl->tpl != srctpl) |
| 556 | { |
| 557 | for (; tpl->tpl == tpl && sec1 != NULL; |
| 558 | sec1 = sec1->next, sec2 = sec2->next) |
| 559 | { |
| 560 | if (srctpl->tpl == sec1->tpl) |
| 561 | tpl->tpl = sec2->tpl; |
| 562 | else |
| 563 | { |
| 564 | tpl_adjust_selection(tpl, |
| 565 | srctpl, |
| 566 | sec2->tpl->first, |
| 567 | sec1->tpl->first); |
| 568 | } |
| 569 | } |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | |
| 574 | /* Recursive copy */ |
no outgoing calls
no test coverage detected
searching dependent graphs…