diff options
Diffstat (limited to 'test/test_mouse.c')
| -rw-r--r-- | test/test_mouse.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/test/test_mouse.c b/test/test_mouse.c index 5508ea42f503..5a47f2b5253a 100644 --- a/test/test_mouse.c +++ b/test/test_mouse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2022-2023,2024 Thomas E. Dickey * + * Copyright 2022-2024,2025 Thomas E. Dickey * * Copyright 2022 Leonid S. Usov <leonid.s.usov at gmail.com> * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -20,9 +20,14 @@ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * ****************************************************************************/ /* - * $Id: test_mouse.c,v 1.31 2024/03/30 20:45:31 tom Exp $ + * $Id: test_mouse.c,v 1.38 2025/07/05 15:11:35 tom Exp $ * * Author: Leonid S Usov * @@ -31,20 +36,20 @@ #include <test.priv.h> -#if defined(NCURSES_MOUSE_VERSION) && !defined(_NC_WINDOWS) +#if defined(NCURSES_MOUSE_VERSION) && !defined(_NC_WINDOWS_NATIVE) static int logoffset = 0; static void raw_loop(void) { - char *xtermcap; + const char *xtermcap; printf("Entering raw mode. Ctrl-c to quit.\n"); newterm(NULL, stdout, stdin); raw(); - xtermcap = tigetstr("XM"); + xtermcap = tigetstr(UserCap(XM)); if (!VALID_STRING(xtermcap)) { fprintf(stderr, "couldn't get XM terminfo"); return; @@ -214,8 +219,8 @@ usage(int ok) ,USAGE_COMMON ,"Options:" ," -r show raw input stream, injecting a new line before every ESC" - ," -i n set mouse interval to n; default is 0 (no double-clicks)" - ," -T term use terminal description other than $TERM" + ," -i NUM set mouse interval to NUM; default is 0 (no double-clicks)" + ," -T TERM override $TERM" }; unsigned n; for (n = 0; n < sizeof(msg) / sizeof(char *); ++n) { @@ -253,11 +258,8 @@ main(int argc, char *argv[]) putenv(my_environ); } break; - case OPTS_VERSION: - show_version(argv); - ExitProgram(EXIT_SUCCESS); default: - usage(ch == OPTS_USAGE); + CASE_COMMON; /* NOTREACHED */ } } |
