X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_termcap.c;h=a3733c67d1c287b17f9d13395aefc2f0a9344d09;hp=4289de0540e3cfba1a008300646cbc4bafad9992;hb=da5e7c6148aa378da9d8da09be73e0ddd3995c6f;hpb=59108c98bda25ae50b3a319e2bcb7f4b9a174024 diff --git a/test/demo_termcap.c b/test/demo_termcap.c index 4289de05..a3733c67 100644 --- a/test/demo_termcap.c +++ b/test/demo_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2005-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2005-2010,2011 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 * @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey * - * $Id: demo_termcap.c,v 1.12 2009/10/10 16:01:41 tom Exp $ + * $Id: demo_termcap.c,v 1.14 2011/01/15 21:41:27 tom Exp $ * * A simple demo of the termcap interface. */ @@ -125,7 +125,7 @@ dumpit(NCURSES_CONST char *cap) } else if ((num = tgetnum(cap)) >= 0) { printf(FNAME(num), cap); printf(" %d\n", num); - } else if ((num = tgetflag(cap)) > 0) { + } else if (tgetflag(cap) > 0) { printf(FNAME(flg), cap); printf("%s\n", "true"); } @@ -165,7 +165,11 @@ demo_terminfo(NCURSES_CONST char *name) NCURSES_CONST char *cap; printf("Terminal type \"%s\"\n", name); +#if HAVE_SETUPTERM setupterm(name, 1, (int *) 0); +#else + setterm(name); +#endif if (b_opt) { for (n = 0;; ++n) {