[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: field_arg question
From: |
Thomas Dickey |
Subject: |
Re: field_arg question |
Date: |
Sun, 13 Apr 2008 11:13:24 -0400 (EDT) |
On Sun, 13 Apr 2008, Mike Gran wrote:
Hi-
The field_arg function in the forms library returns a
void pointer to field type arguments. How I cast the
returned void * to get the arguments for TYPE_ENUM?
I guess the short answer is that you "don't".
The long answer (reading the code) is that the void* corresponds to a
private TypeArgument (if the type happened to be a linked type - none
of the examples provided appear to be), or a type defined within the
file that provides the field type in question. For TYPE_ENUM, that
appears to be this (still reading the code):
typedef struct
{
char **kwds;
int count;
bool checkcase;
bool checkunique;
}
enumARG;
I'm looking at fty_enum.c for the last, and _nc_Make_Argument() in
fld_def.c
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net