/****************************************************************************
- * Copyright (c) 2005-2006,2007 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 *
* authorization. *
****************************************************************************/
/*
- * $Id: demo_menus.c,v 1.21 2007/07/21 17:45:09 tom Exp $
+ * $Id: demo_menus.c,v 1.22 2008/02/09 18:09:26 tom Exp $
*
* Demonstrate a variety of functions from the menu library.
* Thomas Dickey - 2005/4/9
static void
build_file_menu(MenuNo number)
{
- static const char *labels[] =
+ static CONST_MENUS char *labels[] =
{
"Exit",
(char *) 0
static ITEM *items[SIZEOF(labels)];
ITEM **ip = items;
- const char **ap;
+ CONST_MENUS char **ap;
for (ap = labels; *ap; ap++)
*ip++ = new_item(*ap, "");
static void
build_select_menu(MenuNo number, char *filename)
{
- static const char *labels[] =
+ static CONST_MENUS char *labels[] =
{
"Lions",
"Tigers",
static ITEM **items;
ITEM **ip;
- const char **ap = 0;
+ CONST_MENUS char **ap = 0;
unsigned count = 0;
if (filename != 0) {
unsigned size = sb.st_size;
unsigned j, k;
char *blob = malloc(size + 1);
- const char **list = (const char **) calloc(sizeof(*list), size + 1);
+ CONST_MENUS char **list =
+ (CONST_MENUS char **) calloc(sizeof(*list), size + 1);
items = (ITEM **) calloc(sizeof(ITEM *), size + 1);
if (blob != 0 && list != 0) {
static void
build_menus(char *filename)
{
- static const char *labels[] =
+ static CONST_MENUS char *labels[] =
{
"File",
"Select",
static ITEM *items[SIZEOF(labels)];
ITEM **ip = items;
- const char **ap;
+ CONST_MENUS char **ap;
for (ap = labels; *ap; ap++)
*ip++ = new_item(*ap, "");