/*
* 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-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* LINTLIBRARY */
/*
* keypad.c
*
* XCurses Library
*
* Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved.
*
*/
#ifdef M_RCSID
#ifndef lint
static char rcsID[] =
"$Header: /team/ps/sun_xcurses/archive/local_changes/xcurses/src/lib/"
"cbates Exp $";
#endif
#endif
#include <private.h>
#include <stdlib.h>
/*
* Add a function key string to the decode tree.
* Return -1 on error, else the length of the key sequence.
*/
static int
{
const char *start;
return (-1);
return (0);
/* First node of tree. */
return (-1);
} else {
/* Find node to insert function key sequence into the tree. */
return (-1);
break;
}
break;
}
}
/* Insert string into the tree; node->child == null. */
while (*str != '\0') {
return (-1);
}
}
/* (str - start) should be enough small to fit in "int" */
}
void
{
}
}
/*
* Initialise the function key decode tree.
*/
int
{
const short (*p)[2];
if (len < 0)
return (-1);
}
return (max);
}
/*
* When true for a given window, then multibyte function key processing
* is done for all input throough that window, see wgetch().
*/
int
{
if (bf) {
if (keypad_xmit)
w->_flags |= W_USE_KEYPAD;
} else {
if (keypad_local)
w->_flags &= ~W_USE_KEYPAD;
}
return (OK);
}