/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1995, by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* keypad.c
*
* XCurses Library
*
* Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved.
*
*/
#ifdef M_RCSID
#ifndef lint
static char rcsID[] = "$Header: /rd/src/libc/xcurses/rcs/keypad.c 1.3 1995/05/24 19:43:46 ant Exp $";
#endif
#endif
#include <private.h>
#include <stdlib.h>
/*f
* Add a function key string to the decode tree.
* Return -1 on error, else the length of the key sequence.
*/
static int
const char *str;
short code;
{
const char *start;
return -1;
if (str == (char *) 0)
return 0;
/* First node of tree. */
return -1;
} else {
/* Find node to insert function key sequence into the tree. */
sizeof *node
);
return -1;
break;
}
break;
}
}
/* Insert string into the tree; node->child == null. */
while (*str != '\0') {
return -1;
}
}
}
void
{
}
}
/*f
* Initialise the function key decode tree.
*/
int
{
short (*p)[2];
if (len < 0)
return -1;
}
return max;
}
/*f
* When true for a given window, then multibyte function key processing
* is done for all input throough that window, see wgetch().
*/
int
{
#ifdef M_CURSES_TRACE
#endif
w->_flags &= ~W_USE_KEYPAD;
if (bf)
w->_flags |= W_USE_KEYPAD;
}