X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_termcap.c;fp=test%2Fdemo_termcap.c;h=30967cc0f4548d3d3b87f9568edb8704df9ace31;hp=110797e502e01db460ae80bc38d89a05355635a1;hb=d7e4a265b50f6fddbad20ea238fdc05a35cbdc2f;hpb=0266ec751090f9523ae676f357095176e293fb16 diff --git a/test/demo_termcap.c b/test/demo_termcap.c index 110797e5..30967cc0 100644 --- a/test/demo_termcap.c +++ b/test/demo_termcap.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey * - * $Id: demo_termcap.c,v 1.43 2014/08/31 23:11:39 tom Exp $ + * $Id: demo_termcap.c,v 1.45 2014/09/05 08:44:49 tom Exp $ * * A simple demo of the termcap interface. */ @@ -369,6 +369,8 @@ typedef enum { static void parse_description(const char *input_name) { + static char empty[1]; + FILE *fp; struct stat sb; size_t count_bools = 0; @@ -585,10 +587,10 @@ parse_description(const char *input_name) * known order. */ if (count_strs) { - my_strvalues[count_strs] = ""; + my_strvalues[count_strs] = empty; my_strcodes[count_strs++] = &my_blob[j]; } else if (count_nums) { - my_numvalues[count_nums] = ""; + my_numvalues[count_nums] = empty; my_numcodes[count_nums++] = &my_blob[j]; } else { my_boolcodes[count_bools++] = &my_blob[j]; @@ -660,7 +662,7 @@ copy_code_list(NCURSES_CONST char *const *list) { int pass; size_t count; - size_t length = 0; + size_t length = 1; char **result = 0; char *blob = 0; char *unused = 0; @@ -776,7 +778,7 @@ main(int argc, char *argv[]) } } -#if NCURSES_XNAMES +#if HAVE_USE_EXTENDED_NAMES use_extended_names(x_opt); #endif