X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fncurses.c;h=37693ac4e6c07c19b2b507a0c2239a0848f2d125;hp=3959b56b2047b1a62e3868855d794ad8092ca3da;hb=c2650100f80134924eda8f22cd7cc1d1d919ee3d;hpb=02f1dee48fe8af6ce054388fba739aa4f975004e diff --git a/test/ncurses.c b/test/ncurses.c index 3959b56b..37693ac4 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. * + * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -40,7 +41,7 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.521 2019/12/14 23:25:29 tom Exp $ +$Id: ncurses.c,v 1.524 2021/03/20 16:11:50 tom Exp $ ***************************************************************************/ @@ -165,7 +166,7 @@ static RGB_DATA *all_colors; #endif static void main_menu(bool); -static void failed(const char *s) GCC_NORETURN; +static GCC_NORETURN void failed(const char *s); static void failed(const char *s) @@ -489,7 +490,7 @@ ShellOut(bool message) addstr("Shelling out..."); def_prog_mode(); endwin(); -#ifdef _WIN32 +#ifdef _NC_WINDOWS system("cmd.exe"); #else IGNORE_RC(system("sh")); @@ -7617,6 +7618,10 @@ settings_test(bool recur GCC_UNUSED) #if HAVE_COLOR_CONTENT show_boolean_setting("can_change_color", can_change_color()); #endif + show_setting_name("LINES"); + printw("%d\n", LINES); + show_setting_name("COLS"); + printw("%d\n", COLS); Pause(); erase(); stop_curses(); @@ -7658,7 +7663,7 @@ usage(void) #if USE_LIBPANEL ," -s msec specify nominal time for panel-demo (default: 1, to hold)" #endif -#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_WIN32) +#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_NC_WINDOWS) ," -T call use_tioctl(TRUE) to allow SIGWINCH to override environment" #endif #ifdef TRACE @@ -7785,7 +7790,6 @@ main_menu(bool top) int (*doit) (bool); char command; unsigned n; - do { printf("This is the ncurses main menu (uppercase for wide-characters)\n"); for (n = 0; n < SIZEOF(cmds); ++n) { @@ -7961,7 +7965,7 @@ main(int argc, char *argv[]) nap_msec = (int) atol(optarg); break; #endif -#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_WIN32) +#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_NC_WINDOWS) case 'T': use_tioctl(TRUE); break;