X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftest_opaque.c;h=bb7a6b0afc05c9f9d7e264682c44dfe756da920f;hp=63b7f586a714e22cbed41163d0cecdc5983b001c;hb=60014650d5e3f088e2d5e8835925cce96db00c33;hpb=17e1f876e3a67019cbd46b02fe28232128ac97b4 diff --git a/test/test_opaque.c b/test/test_opaque.c index 63b7f586..bb7a6b0a 100644 --- a/test/test_opaque.c +++ b/test/test_opaque.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007 Free Software Foundation, Inc. * + * Copyright (c) 2007,2008 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_opaque.c,v 1.4 2007/08/18 17:51:51 tom Exp $ + * $Id: test_opaque.c,v 1.5 2008/01/19 21:01:36 tom Exp $ * * Author: Thomas E Dickey * @@ -51,6 +51,8 @@ #define BASE_Y 6 #define MAX_COLS 1024 +#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20070818) && NCURSES_EXT_FUNCS + static bool Quit(int ch) { @@ -321,7 +323,7 @@ test_opaque(int level, char **argv, WINDOW *stswin) break; case ' ': bool_funcs[active].func(txtwin, - !bool_funcs[active].func(txtwin, -1)); + !bool_funcs[active].func(txtwin, -1)); break; default: beep(); @@ -419,3 +421,11 @@ main(int argc, char *argv[]) endwin(); ExitProgram(EXIT_SUCCESS); } +#else +int +main(void) +{ + printf("This program requires the ncurses library\n"); + ExitProgram(EXIT_FAILURE); +} +#endif