2 * Test lower-right-hand corner access
4 * by Eric S. Raymond <esr@thyrsus.com>
6 * This can't be part of the ncurses test-program, because ncurses rips off the
7 * bottom line to do labels.
9 * $Id: lrtest.c,v 0.14 1999/10/23 19:44:35 tom Exp $
12 #include <test.priv.h>
16 int y, x, mode, dir, inc;
21 * Make a couple of markers go 'round the border to demonstrate that we can
22 * really write to all positions properly.
27 mvaddch(m->y, m->x, m->value);
28 if (m->mode == 0) { /* along the x-direction */
32 m->inc = -m->dir * m->inc;
35 } else if (m->x < 0) {
37 m->inc = -m->dir * m->inc;
41 } else { /* along the y-direction */
45 m->inc = m->dir * m->inc;
48 } else if (m->y < 0) {
50 m->inc = m->dir * m->inc;
60 char *argv[]GCC_UNUSED)
64 {0, 0, 0, -1, 1, '+' | A_BOLD},
66 {0, 0, 1, -1, 3, 'Y'},
67 {0, 8, 0, -1, 1, '+' | A_BOLD},
68 {0, 9, 0, -1, 1, '+' | A_BOLD},
69 {1, 0, 1, 1, 1, '*' | A_REVERSE},
70 {2, 0, 1, 1, 1, '*' | A_REVERSE}
76 nodelay(stdscr, TRUE);
83 move(LINES / 2 - 1, 4);
87 || (enter_am_mode && exit_am_mode))) {
88 addstr("Your terminal lacks the capabilities needed to address the\n");
90 addstr("lower-right-hand corner of the screen.\n");
92 addstr("This is a test of access to the lower right corner.\n");
94 addstr("If the top of the box is missing, the test failed.\n");
95 move(LINES / 2 + 1, 4);
96 addstr("Please report this (with a copy of your terminfo entry).\n");
97 move(LINES / 2 + 2, 4);
98 addstr("to the ncurses maintainers, at bug-ncurses@gnu.org.\n");
106 for (n = 0; n < sizeof(marks) / sizeof(marks[0]); n++) {
110 if ((ch = getch()) > 0) {
114 nodelay(stdscr, FALSE);
116 nodelay(stdscr, TRUE);
118 else if (ch == KEY_RESIZE) {
132 /* lrtest.c ends here */