MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Curses Library Functions                  formfieldtype(3CURSES)



NAME
     formfieldtype,        newfieldtype,        freefieldtype,
     setfieldtypearg,  setfieldtypechoice,  linkfieldtype  -
     forms fieldtype routines

SYNOPSIS
     cc [ flag... ] file... -lform  -lcurses  [ library... ]
     #include 

     FIELDTYPE *newfieldtype(int (* fieldcheck)(FIELD *, char *),
          int (*charcheck)(int, char *));


     int freefieldtype(FIELDTYPE *fieldtype);


     int setfieldtypearg(FIELDTYPE *fieldtype, char *(* makarg)(valist *),
          char *(* copyarg)(char *), void (* freearg)(char *));


     int setfieldtypechoice(FIELDTYPE *fieldtype, int (* nextchoice)
          (FIELD *, char *), int (*prevchoice)(FIELD *, char *));


     FIELDTYPE *linkfieldtype(FIELDTYPE *type1, FIELDTYPE *type2);


DESCRIPTION
     newfieldtype() creates a new field  type.  The  application
     programmer  must write the function fieldcheck, which vali-
     dates the field value, and the  function  charcheck,  which
     validates  each  character. freefieldtype() frees the space
     allocated for the field type.


     By  associating  function  pointers  with  a   field   type,
     setfieldtypearg()  connects  to  the field type additional
     arguments necessary for a  setfieldtype()  call.  Function
     makarg allocates a structure for the field specific parame-
     ters to setfieldtype() and returns a pointer to the  saved
     data.  Function copyarg duplicates the structure created by
     makearg. Function freearg frees any storage  allocated  by
     makearg or copyarg.


     The    formdriver()    requests     REQNEXTCHOICE     and
     REQPREVCHOICE  let  the  user request the next or previous
     value of a field type comprising an ordered set  of  values.
     setfieldtypechoice()  allows the application programmer to
     implement these requests for the given field type. It  asso-
     ciates  with  the given field type those application-defined
     functions that return  pointers  to  the  next  or  previous



SunOS 5.11          Last change: 31 Dec 1996                    1






Curses Library Functions                  formfieldtype(3CURSES)



     choice for the field.


     linkfieldtype() returns a pointer to the field  type  built
     from  the  two given types. The constituent types may be any
     application-defined or pre-defined types.

RETURN VALUES
     Routines that return pointers always return NUL  on  error.
     Routines that return an integer return one of the following:

     EOK              The function returned successfully.


     ESYSTEMEROR    System error.


     EBADARGUMENT    An argument is incorrect.


     ECONECTED       Type is connected to one or more fields.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     Unsafe                      
    


SEE ALSO
     curses(3CURSES), forms(3CURSES), attributes(5)

NOTES
     The  header    automatically  includes  the  headers
      and .













SunOS 5.11          Last change: 31 Dec 1996                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™