X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=test%2Ftest_addstr.c;h=c553d23f06955395561752d2e2d3afe36b172fa5;hb=7af63696972b12659832a1c3413d9ace9641c8f6;hp=a6876a89bf352bb1aa74930979dd634a4ba1b169;hpb=8554ac8f8bb70116fbc962f529168d273e950e2b;p=ncurses.git diff --git a/test/test_addstr.c b/test/test_addstr.c index a6876a89..c553d23f 100644 --- a/test/test_addstr.c +++ b/test/test_addstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2009-2010,2012 Free Software Foundation, Inc. * + * Copyright (c) 2009-2012,2016 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_addstr.c,v 1.9 2012/11/24 19:49:02 tom Exp $ + * $Id: test_addstr.c,v 1.11 2016/09/10 21:28:20 tom Exp $ * * Demonstrate the waddstr() and waddch functions. * Thomas Dickey - 2009/9/12 @@ -155,7 +155,8 @@ test_adds(int level) static char cmd[80]; setlocale(LC_ALL, ""); - putenv(strcpy(cmd, "TABSIZE=8")); + _nc_STRCPY(cmd, "TABSIZE=8", sizeof(cmd)); + putenv(cmd); initscr(); (void) cbreak(); /* take input chars one at a time, no wait for \n */ @@ -213,11 +214,13 @@ test_adds(int level) case key_RECUR: test_adds(level + 1); - touchwin(look); + if (look) + touchwin(look); touchwin(work); touchwin(show); - wnoutrefresh(look); + if (look) + wnoutrefresh(look); wnoutrefresh(work); wnoutrefresh(show);