X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_termcap.c;h=3e856489407b08217b2d39bfec26212dec317fe6;hp=fc9c8ab9ac5e2ba048b5073bea067b6459bb986b;hb=7c4bc0fa99a1be37a14aa19a5943a549570954c4;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/test/demo_termcap.c b/test/demo_termcap.c index fc9c8ab9..3e856489 100644 --- a/test/demo_termcap.c +++ b/test/demo_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 2005-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 * @@ -29,10 +29,11 @@ /* * Author: Thomas E. Dickey * - * $Id: demo_termcap.c,v 1.5 2006/05/06 19:06:36 tom Exp $ + * $Id: demo_termcap.c,v 1.7 2008/02/09 18:08:36 tom Exp $ * * A simple demo of the termcap interface. */ +#define USE_TINFO #include #if HAVE_TGETENT @@ -115,7 +116,7 @@ dumpit(char *cap) } static void -demo_termcap(const char *name) +demo_termcap(char *name) { char buffer[1024]; @@ -152,11 +153,13 @@ main(int argc, char *argv[]) } else if ((name = getenv("TERM")) != 0) { demo_termcap(name); } else { - demo_termcap("dumb"); + static char dumb[] = "dumb"; + demo_termcap(dumb); } ExitProgram(EXIT_SUCCESS); } + #else int main(int argc GCC_UNUSED,