| 556 | then action must be taken in trampoli.[ch]. */ |
| 557 | |
| 558 | void |
| 559 | nocmov(int x, int y) |
| 560 | { |
| 561 | if ((int) ttyDisplay->cury > y) { |
| 562 | if (UP) { |
| 563 | while ((int) ttyDisplay->cury > y) { /* Go up. */ |
| 564 | xputs(UP); |
| 565 | ttyDisplay->cury--; |
| 566 | } |
| 567 | } else if (nh_CM) { |
| 568 | cmov(x, y); |
| 569 | } else if (HO) { |
| 570 | home(); |
| 571 | tty_curs(BASE_WINDOW, x + 1, y); |
| 572 | } /* else impossible("..."); */ |
| 573 | } else if ((int) ttyDisplay->cury < y) { |
| 574 | if (XD) { |
| 575 | while ((int) ttyDisplay->cury < y) { |
| 576 | xputs(XD); |
| 577 | ttyDisplay->cury++; |
| 578 | } |
| 579 | } else if (nh_CM) { |
| 580 | cmov(x, y); |
| 581 | } else { |
| 582 | while ((int) ttyDisplay->cury < y) { |
| 583 | (void) xputc('\n'); |
| 584 | ttyDisplay->curx = 0; |
| 585 | ttyDisplay->cury++; |
| 586 | } |
| 587 | } |
| 588 | } |
| 589 | if ((int) ttyDisplay->curx < x) { /* Go to the right. */ |
| 590 | if (!nh_ND) { |
| 591 | cmov(x, y); |
| 592 | } else { /* bah */ |
| 593 | /* should instead print what is there already */ |
| 594 | while ((int) ttyDisplay->curx < x) { |
| 595 | xputs(nh_ND); |
| 596 | ttyDisplay->curx++; |
| 597 | } |
| 598 | } |
| 599 | } else if ((int) ttyDisplay->curx > x) { |
| 600 | while ((int) ttyDisplay->curx > x) { /* Go to the left. */ |
| 601 | xputs(BC); |
| 602 | ttyDisplay->curx--; |
| 603 | } |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | void |
| 608 | cmov(int x, int y) |