summaryrefslogtreecommitdiffstats
path: root/lib/libform/fty_enum.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-11-26 04:00:50 +0000
committermillert <millert@openbsd.org>1997-11-26 04:00:50 +0000
commit6cd90de493b49eff795fac736242c7fcd2362c99 (patch)
treea0b7f81919b2ae827554382517ac7b016d7abf0f /lib/libform/fty_enum.c
parentlibmenu from ncurses 4.1. Post 4.1 patches to be applied in a separate commit. (diff)
downloadwireguard-openbsd-6cd90de493b49eff795fac736242c7fcd2362c99.tar.xz
wireguard-openbsd-6cd90de493b49eff795fac736242c7fcd2362c99.zip
libform from ncurses 4.1. Post 4.1 patches to be applied in a separate commit.
Diffstat (limited to 'lib/libform/fty_enum.c')
-rw-r--r--lib/libform/fty_enum.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/libform/fty_enum.c b/lib/libform/fty_enum.c
index b62f0d92faf..7d54e7779b2 100644
--- a/lib/libform/fty_enum.c
+++ b/lib/libform/fty_enum.c
@@ -5,9 +5,16 @@
* If you develop a field type that might be of general use, please send
* it back to the ncurses maintainers for inclusion in the next version.
*/
+/***************************************************************************
+* *
+* Author : Juergen Pfeifer, Juergen.Pfeifer@T-Online.de *
+* *
+***************************************************************************/
#include "form.priv.h"
+MODULE_ID("Id: fty_enum.c,v 1.5 1997/02/15 17:33:59 tom Exp $")
+
typedef struct {
char **kwds;
int count;
@@ -55,7 +62,7 @@ static void *Make_Enum_Type(va_list * ap)
+--------------------------------------------------------------------------*/
static void *Copy_Enum_Type(const void * argp)
{
- enumARG *ap = (enumARG *)argp;
+ const enumARG *ap = (const enumARG *)argp;
enumARG *new = (enumARG *)0;
if (argp)
@@ -152,9 +159,9 @@ static int Compare(const unsigned char *s, const unsigned char *buf,
+--------------------------------------------------------------------------*/
static bool Check_Enum_Field(FIELD * field, const void * argp)
{
- char **kwds = ((enumARG *)argp)->kwds;
- bool ccase = ((enumARG *)argp)->checkcase;
- bool unique = ((enumARG *)argp)->checkunique;
+ char **kwds = ((const enumARG *)argp)->kwds;
+ bool ccase = ((const enumARG *)argp)->checkcase;
+ bool unique = ((const enumARG *)argp)->checkunique;
unsigned char *bp = (unsigned char *)field_buffer(field,0);
char *s, *t, *p;
int res;
@@ -203,7 +210,7 @@ static const char *dummy[] = { (char *)0 };
+--------------------------------------------------------------------------*/
static bool Next_Enum(FIELD * field, const void * argp)
{
- enumARG *args = (enumARG *)argp;
+ const enumARG *args = (const enumARG *)argp;
char **kwds = args->kwds;
bool ccase = args->checkcase;
int cnt = args->count;
@@ -237,7 +244,7 @@ static bool Next_Enum(FIELD * field, const void * argp)
+--------------------------------------------------------------------------*/
static bool Previous_Enum(FIELD * field, const void * argp)
{
- enumARG *args = (enumARG *)argp;
+ const enumARG *args = (const enumARG *)argp;
int cnt = args->count;
char **kwds = &args->kwds[cnt-1];
bool ccase = args->checkcase;