]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/demo_termcap.c
ncurses 5.6 - patch 20080209
[ncurses.git] / test / demo_termcap.c
index fc9c8ab9ac5e2ba048b5073bea067b6459bb986b..3e856489407b08217b2d39bfec26212dec317fe6 100644 (file)
@@ -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            *
 /*
  * 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 <test.priv.h>
 
 #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,