libpayload: remove trailing whitespace and run dos2unix
Change-Id: Iffed3602456f5306711c65f06c873c58d4086e11 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/363 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
committed by
Patrick Georgi
parent
dd69063289
commit
e11835e299
@@ -35,7 +35,7 @@
|
||||
MODULE_ID("$Id: fld_ftchoice.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_fieldtype_choice(
|
||||
| FIELDTYPE *typ,
|
||||
| bool (* const next_choice)(FIELD *,const void *),
|
||||
|
@@ -35,14 +35,14 @@
|
||||
MODULE_ID("$Id: fld_ftlink.c,v 1.14 2010/01/23 21:14:35 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : FIELDTYPE *link_fieldtype(
|
||||
| FIELDTYPE *type1,
|
||||
| FIELDTYPE *type2)
|
||||
|
|
||||
|
|
||||
| Description : Create a new fieldtype built from the two given types.
|
||||
| They are connected by an logical 'OR'.
|
||||
| If an error occurs, errno is set to
|
||||
| If an error occurs, errno is set to
|
||||
| E_BAD_ARGUMENT - invalid arguments
|
||||
| E_SYSTEM_ERROR - system error (no memory)
|
||||
|
|
||||
|
@@ -35,12 +35,12 @@
|
||||
MODULE_ID("$Id: fld_info.c,v 1.11 2010/01/23 21:14:35 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int field_info(const FIELD *field,
|
||||
| int *rows, int *cols,
|
||||
| int *frow, int *fcol,
|
||||
| int *nrow, int *nbuf)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve infos about the fields creation parameters.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
@@ -77,11 +77,11 @@ field_info(const FIELD *field,
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int dynamic_field_info(const FIELD *field,
|
||||
| int *drows, int *dcols,
|
||||
| int *maxgrow)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve informations about a dynamic fields current
|
||||
| dynamic parameters.
|
||||
|
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: fld_just.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_field_just(FIELD *field, int just)
|
||||
|
|
||||
|
|
||||
| Description : Set the fields type of justification.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
@@ -69,9 +69,9 @@ set_field_just(FIELD *field, int just)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int field_just( const FIELD *field )
|
||||
|
|
||||
|
|
||||
| Description : Retrieve the fields type of justification
|
||||
|
|
||||
| Return Values : The justification type.
|
||||
|
@@ -35,14 +35,14 @@
|
||||
MODULE_ID("$Id: fld_link.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Function : FIELD *link_field(FIELD *field, int frow, int fcol)
|
||||
|
|
||||
| Facility : libnform
|
||||
| Function : FIELD *link_field(FIELD *field, int frow, int fcol)
|
||||
|
|
||||
| Description : Duplicates the field at the specified position. The
|
||||
| new field shares its buffers with the original one,
|
||||
| the attributes are independent.
|
||||
| If an error occurs, errno is set to
|
||||
|
|
||||
|
|
||||
| E_BAD_ARGUMENT - invalid argument
|
||||
| E_SYSTEM_ERROR - system error
|
||||
|
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: fld_max.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_max_field(FIELD *field, int maxgrow)
|
||||
|
|
||||
|
|
||||
| Description : Set the maximum growth for a dynamic field. If maxgrow=0
|
||||
| the field may grow to any possible size.
|
||||
|
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: fld_move.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int move_field(FIELD *field,int frow, int fcol)
|
||||
|
|
||||
|
|
||||
| Description : Moves the disconnected field to the new location in
|
||||
| the forms subwindow.
|
||||
|
|
||||
|
@@ -39,9 +39,9 @@ MODULE_ID("$Id: fld_opts.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_field_opts(FIELD *field, Field_Options opts)
|
||||
|
|
||||
|
|
||||
| Description : Turns on the named options for this field and turns
|
||||
| off all the remaining options.
|
||||
|
|
||||
@@ -64,9 +64,9 @@ set_field_opts(FIELD *field, Field_Options opts)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : Field_Options field_opts(const FIELD *field)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve the fields options.
|
||||
|
|
||||
| Return Values : The options.
|
||||
@@ -80,10 +80,10 @@ field_opts(const FIELD *field)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int field_opts_on(FIELD *field, Field_Options opts)
|
||||
|
|
||||
| Description : Turns on the named options for this field and all the
|
||||
|
|
||||
| Description : Turns on the named options for this field and all the
|
||||
| remaining options are unchanged.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
@@ -108,10 +108,10 @@ field_opts_on(FIELD *field, Field_Options opts)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int field_opts_off(FIELD *field, Field_Options opts)
|
||||
|
|
||||
| Description : Turns off the named options for this field and all the
|
||||
|
|
||||
| Description : Turns off the named options for this field and all the
|
||||
| remaining options are unchanged.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: fld_pad.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_field_pad(FIELD *field, int ch)
|
||||
|
|
||||
|
|
||||
| Description : Set the pad character used to fill the field. This must
|
||||
| be a printable character.
|
||||
|
|
||||
@@ -67,9 +67,9 @@ set_field_pad(FIELD *field, int ch)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int field_pad(const FIELD *field)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve the fields pad character.
|
||||
|
|
||||
| Return Values : The pad character.
|
||||
|
@@ -35,10 +35,10 @@
|
||||
MODULE_ID("$Id: fld_page.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_new_page(FIELD *field, bool new_page_flag)
|
||||
|
|
||||
| Description : Marks the field as the beginning of a new page of
|
||||
|
|
||||
| Description : Marks the field as the beginning of a new page of
|
||||
| the form.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
@@ -62,9 +62,9 @@ set_new_page(FIELD *field, bool new_page_flag)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : bool new_page(const FIELD *field)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve the info whether or not the field starts a
|
||||
| new page on the form.
|
||||
|
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: fld_stat.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_field_status(FIELD *field, bool status)
|
||||
|
|
||||
|
|
||||
| Description : Set or clear the 'changed' indication flag for that
|
||||
| fields primary buffer.
|
||||
|
|
||||
@@ -59,11 +59,11 @@ set_field_status(FIELD *field, bool status)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : bool field_status(const FIELD *field)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve the value of the 'changed' indication flag
|
||||
| for that fields primary buffer.
|
||||
| for that fields primary buffer.
|
||||
|
|
||||
| Return Values : TRUE - buffer has been changed
|
||||
| FALSE - buffer has not been changed
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: fld_type.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_field_type(FIELD *field, FIELDTYPE *type,...)
|
||||
|
|
||||
|
|
||||
| Description : Associate the specified fieldtype with the field.
|
||||
| Certain field types take additional arguments. Look
|
||||
| at the spec of the field types !
|
||||
@@ -80,9 +80,9 @@ set_field_type(FIELD *field, FIELDTYPE *type,...)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : FIELDTYPE *field_type(const FIELD *field)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve the associated fieldtype for this field.
|
||||
|
|
||||
| Return Values : Pointer to fieldtype of NULL if none is defined.
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: fld_user.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_field_userptr(FIELD *field, void *usrptr)
|
||||
|
|
||||
|
|
||||
| Description : Set the pointer that is reserved in any field to store
|
||||
| application relevant informations
|
||||
|
|
||||
@@ -53,9 +53,9 @@ set_field_userptr(FIELD *field, void *usrptr)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : void *field_userptr(const FIELD *field)
|
||||
|
|
||||
|
|
||||
| Description : Return the pointer that is reserved in any field to
|
||||
| store application relevant informations.
|
||||
|
|
||||
|
@@ -190,12 +190,12 @@ extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void);
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void);
|
||||
|
||||
extern NCURSES_EXPORT(FIELDTYPE *)
|
||||
_nc_generic_fieldtype(bool (*const field_check) (FORM*,
|
||||
FIELD *,
|
||||
_nc_generic_fieldtype(bool (*const field_check) (FORM*,
|
||||
FIELD *,
|
||||
const void *),
|
||||
bool (*const char_check) (int,
|
||||
FORM*,
|
||||
FIELD*,
|
||||
bool (*const char_check) (int,
|
||||
FORM*,
|
||||
FIELD*,
|
||||
const void *),
|
||||
bool (*const next)(FORM*,FIELD*,const void*),
|
||||
bool (*const prev)(FORM*,FIELD*,const void*),
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: frm_cursor.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int pos_form_cursor(FORM * form)
|
||||
|
|
||||
|
|
||||
| Description : Moves the form window cursor to the location required
|
||||
| by the form driver to resume form processing. This may
|
||||
| be needed after the application calls a curses library
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: frm_data.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : bool data_behind(const FORM *form)
|
||||
|
|
||||
|
|
||||
| Description : Check for off-screen data behind. This is nearly trivial
|
||||
| because the beginning of a field is fixed.
|
||||
|
|
||||
@@ -69,12 +69,12 @@ data_behind(const FORM *form)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static char * Only_Padding(
|
||||
| WINDOW *w,
|
||||
| int len,
|
||||
| int pad)
|
||||
|
|
||||
|
|
||||
| Description : Test if 'length' cells starting at the current position
|
||||
| contain a padding character.
|
||||
|
|
||||
@@ -122,11 +122,11 @@ Only_Padding(WINDOW *w, int len, int pad)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : bool data_ahead(const FORM *form)
|
||||
|
|
||||
|
|
||||
| Description : Check for off-screen data ahead. This is more difficult
|
||||
| because a dynamic field has a variable end.
|
||||
| because a dynamic field has a variable end.
|
||||
|
|
||||
| Return Values : TRUE - there are off-screen data ahead
|
||||
| FALSE - there are no off-screen data ahead
|
||||
|
@@ -64,11 +64,11 @@ static FORM default_form =
|
||||
NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static FIELD *Insert_Field_By_Position(
|
||||
| FIELD *new_field,
|
||||
| FIELD *new_field,
|
||||
| FIELD *head )
|
||||
|
|
||||
|
|
||||
| Description : Insert new_field into sorted fieldlist with head "head"
|
||||
| and return new head of sorted fieldlist. Sorting
|
||||
| criteria is (row,column). This is a circular list.
|
||||
@@ -112,9 +112,9 @@ Insert_Field_By_Position(FIELD *newfield, FIELD *head)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void Disconnect_Fields(FORM *form)
|
||||
|
|
||||
|
|
||||
| Description : Break association between form and array of fields.
|
||||
|
|
||||
| Return Values : -
|
||||
@@ -142,9 +142,9 @@ Disconnect_Fields(FORM *form)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static int Connect_Fields(FORM *form, FIELD **fields)
|
||||
|
|
||||
|
|
||||
| Description : Set association between form and array of fields.
|
||||
|
|
||||
| Return Values : E_OK - no error
|
||||
@@ -249,10 +249,10 @@ Connect_Fields(FORM *form, FIELD **fields)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static int Associate_Fields(FORM *form, FIELD **fields)
|
||||
|
|
||||
| Description : Set association between form and array of fields.
|
||||
|
|
||||
| Description : Set association between form and array of fields.
|
||||
| If there are fields, position to first active field.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
@@ -282,9 +282,9 @@ Associate_Fields(FORM *form, FIELD **fields)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : FORM *new_form_sp(SCREEN* sp, FIELD** fields )
|
||||
|
|
||||
|
|
||||
| Description : Create new form with given array of fields.
|
||||
|
|
||||
| Return Values : Pointer to form. NULL if error occurred.
|
||||
@@ -330,9 +330,9 @@ NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : FORM* new_form(FIELD** fields )
|
||||
|
|
||||
|
|
||||
| Description : Create new form with given array of fields.
|
||||
|
|
||||
| Return Values : Pointer to form. NULL if error occurred.
|
||||
@@ -351,9 +351,9 @@ new_form(FIELD **fields)
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int free_form( FORM *form )
|
||||
|
|
||||
|
|
||||
| Description : Release internal memory associated with form.
|
||||
|
|
||||
| Return Values : E_OK - no error
|
||||
@@ -380,9 +380,9 @@ free_form(FORM *form)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_form_fields( FORM *form, FIELD **fields )
|
||||
|
|
||||
|
|
||||
| Description : Set a new association of an array of fields to a form
|
||||
|
|
||||
| Return Values : E_OK - no error
|
||||
@@ -415,9 +415,9 @@ set_form_fields(FORM *form, FIELD **fields)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : FIELD **form_fields( const FORM *form )
|
||||
|
|
||||
|
|
||||
| Description : Retrieve array of fields
|
||||
|
|
||||
| Return Values : Pointer to field array
|
||||
@@ -430,9 +430,9 @@ form_fields(const FORM *form)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int field_count( const FORM *form )
|
||||
|
|
||||
|
|
||||
| Description : Retrieve number of fields
|
||||
|
|
||||
| Return Values : Number of fields, -1 if none are defined
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: frm_opts.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_form_opts(FORM *form, Form_Options opts)
|
||||
|
|
||||
|
|
||||
| Description : Turns on the named options and turns off all the
|
||||
| remaining options for that form.
|
||||
|
|
||||
@@ -60,9 +60,9 @@ set_form_opts(FORM *form, Form_Options opts)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : Form_Options form_opts(const FORM *)
|
||||
|
|
||||
|
|
||||
| Description : Retrieves the current form options.
|
||||
|
|
||||
| Return Values : The option flags.
|
||||
@@ -75,13 +75,13 @@ form_opts(const FORM *form)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int form_opts_on(FORM *form, Form_Options opts)
|
||||
|
|
||||
| Description : Turns on the named options; no other options are
|
||||
|
|
||||
| Description : Turns on the named options; no other options are
|
||||
| changed.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
@@ -100,13 +100,13 @@ form_opts_on(FORM *form, Form_Options opts)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int form_opts_off(FORM *form, Form_Options opts)
|
||||
|
|
||||
| Description : Turns off the named options; no other options are
|
||||
|
|
||||
| Description : Turns off the named options; no other options are
|
||||
| changed.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: frm_page.c,v 1.11 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_form_page(FORM * form,int page)
|
||||
|
|
||||
|
|
||||
| Description : Set the page number of the form.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
@@ -87,9 +87,9 @@ set_form_page(FORM *form, int page)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int form_page(const FORM * form)
|
||||
|
|
||||
|
|
||||
| Description : Return the current page of the form.
|
||||
|
|
||||
| Return Values : >= 0 : current page number
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: frm_post.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int post_form(FORM * form)
|
||||
|
|
||||
|
|
||||
| Description : Writes the form into its associated subwindow.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
@@ -87,9 +87,9 @@ post_form(FORM *form)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int unpost_form(FORM * form)
|
||||
|
|
||||
|
|
||||
| Description : Erase form from its associated subwindow.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
|
@@ -107,9 +107,9 @@ static const char *request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] =
|
||||
#define A_SIZE (sizeof(request_names)/sizeof(request_names[0]))
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : const char * form_request_name (int request);
|
||||
|
|
||||
|
|
||||
| Description : Get the external name of a form request.
|
||||
|
|
||||
| Return Values : Pointer to name - on success
|
||||
@@ -130,9 +130,9 @@ form_request_name(int request)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int form_request_by_name (const char *str);
|
||||
|
|
||||
|
|
||||
| Description : Search for a request with this name.
|
||||
|
|
||||
| Return Values : Request Id - on success
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: frm_scale.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int scale_form( const FORM *form, int *rows, int *cols )
|
||||
|
|
||||
|
|
||||
| Description : Retrieve size of form
|
||||
|
|
||||
| Return Values : E_OK - no error
|
||||
|
@@ -35,10 +35,10 @@
|
||||
MODULE_ID("$Id: frm_sub.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_form_sub(FORM *form, WINDOW *win)
|
||||
|
|
||||
| Description : Set the subwindow of the form to win.
|
||||
|
|
||||
| Description : Set the subwindow of the form to win.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
| E_POSTED - form is posted
|
||||
@@ -65,9 +65,9 @@ set_form_sub(FORM *form, WINDOW *win)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : WINDOW *form_sub(const FORM *)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve the window of the form.
|
||||
|
|
||||
| Return Values : The pointer to the Subwindow.
|
||||
|
@@ -35,9 +35,9 @@
|
||||
MODULE_ID("$Id: frm_user.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_form_userptr(FORM *form, void *usrptr)
|
||||
|
|
||||
|
|
||||
| Description : Set the pointer that is reserved in any form to store
|
||||
| application relevant informations
|
||||
|
|
||||
@@ -53,9 +53,9 @@ set_form_userptr(FORM *form, void *usrptr)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : void *form_userptr(const FORM *form)
|
||||
|
|
||||
|
|
||||
| Description : Return the pointer that is reserved in any form to
|
||||
| store application relevant informations.
|
||||
|
|
||||
|
@@ -35,10 +35,10 @@
|
||||
MODULE_ID("$Id: frm_win.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int set_form_win(FORM *form,WINDOW *win)
|
||||
|
|
||||
| Description : Set the window of the form to win.
|
||||
|
|
||||
| Description : Set the window of the form to win.
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
| E_POSTED - form is posted
|
||||
@@ -65,9 +65,9 @@ set_form_win(FORM *form, WINDOW *win)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : WINDOW *form_win(const FORM *)
|
||||
|
|
||||
|
|
||||
| Description : Retrieve the window of the form.
|
||||
|
|
||||
| Return Values : The pointer to the Window or stdscr if there is none.
|
||||
|
@@ -54,9 +54,9 @@ typedef struct
|
||||
enumParams;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void *Generic_Enum_Type(void * arg)
|
||||
|
|
||||
|
|
||||
| Description : Allocate structure for enumeration type argument.
|
||||
|
|
||||
| Return Values : Pointer to argument structure or NULL on error
|
||||
@@ -117,9 +117,9 @@ Generic_Enum_Type(void *arg)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void *Make_Enum_Type( va_list * ap )
|
||||
|
|
||||
|
|
||||
| Description : Allocate structure for enumeration type argument.
|
||||
|
|
||||
| Return Values : Pointer to argument structure or NULL on error
|
||||
@@ -137,10 +137,10 @@ Make_Enum_Type(va_list *ap)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void *Copy_Enum_Type( const void * argp )
|
||||
|
|
||||
| Description : Copy structure for enumeration type argument.
|
||||
|
|
||||
| Description : Copy structure for enumeration type argument.
|
||||
|
|
||||
| Return Values : Pointer to argument structure or NULL on error.
|
||||
+--------------------------------------------------------------------------*/
|
||||
@@ -181,9 +181,9 @@ Copy_Enum_Type(const void *argp)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void Free_Enum_Type( void * argp )
|
||||
|
|
||||
|
|
||||
| Description : Free structure for enumeration type argument.
|
||||
|
|
||||
| Return Values : -
|
||||
@@ -218,11 +218,11 @@ Free_Enum_Type(void *argp)
|
||||
#define EXACT 2
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Function : static int Compare(const unsigned char * s,
|
||||
| Facility : libnform
|
||||
| Function : static int Compare(const unsigned char * s,
|
||||
| const unsigned char * buf,
|
||||
| bool ccase )
|
||||
|
|
||||
|
|
||||
| Description : Check whether or not the text in 'buf' matches the
|
||||
| text in 's', at least partial.
|
||||
|
|
||||
@@ -273,11 +273,11 @@ Compare(const unsigned char *s, const unsigned char *buf,
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static bool Check_Enum_Field(
|
||||
| FIELD * field,
|
||||
| const void * argp)
|
||||
|
|
||||
|
|
||||
| Description : Validate buffer content to be a valid enumeration value
|
||||
|
|
||||
| Return Values : TRUE - field is valid
|
||||
@@ -330,10 +330,10 @@ static const char *dummy[] =
|
||||
{(char *)0};
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static bool Next_Enum(FIELD * field,
|
||||
| const void * argp)
|
||||
|
|
||||
|
|
||||
| Description : Check for the next enumeration value
|
||||
|
|
||||
| Return Values : TRUE - next value found and loaded
|
||||
@@ -367,11 +367,11 @@ Next_Enum(FIELD *field, const void *argp)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static bool Previous_Enum(
|
||||
| FIELD * field,
|
||||
| const void * argp)
|
||||
|
|
||||
|
|
||||
| Description : Check for the previous enumeration value
|
||||
|
|
||||
| Return Values : TRUE - previous value found and loaded
|
||||
|
@@ -55,15 +55,15 @@ MODULE_ID("$Id: fty_generic.c,v 1.5 2010/01/23 21:14:36 tom Exp $")
|
||||
* fieldtype they register with the forms library using this call.
|
||||
*
|
||||
* For that purpose we have extended the fieldtype struc by a new element
|
||||
* that gets the arguments from a single struct passed by the caller.
|
||||
*
|
||||
* that gets the arguments from a single struct passed by the caller.
|
||||
*
|
||||
*/
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void *Generic_This_Type( void * arg )
|
||||
|
|
||||
|
|
||||
| Description : We interpret the passed arg just as a handle the
|
||||
| calling language uses to keep track of its allocated
|
||||
| argument structures. We can simply copy it back.
|
||||
@@ -89,7 +89,7 @@ Generic_This_Type(void *arg)
|
||||
| write a field_check and a char_check function and give
|
||||
| them as input to this call. A callback to allow the
|
||||
| release of the allocated memory must also be provided.
|
||||
| For generic field types, we provide some more
|
||||
| For generic field types, we provide some more
|
||||
| information about the field as parameters.
|
||||
|
|
||||
| If an error occurs, errno is set to
|
||||
@@ -139,12 +139,12 @@ _nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *),
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static TypeArgument *GenericArgument(
|
||||
| const FIELDTYPE* typ,
|
||||
| int (*argiterator)(void**),
|
||||
| int* err)
|
||||
|
|
||||
|
|
||||
| Description : The iterator callback must browse through all fieldtype
|
||||
| parameters that have an argument associated with the
|
||||
| type. The iterator returns 1 if the operation to get
|
||||
@@ -200,14 +200,14 @@ GenericArgument(const FIELDTYPE *typ,
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : int _nc_set_generic_fieldtype(
|
||||
| FIELD* field,
|
||||
| FIELDTYPE* ftyp,
|
||||
| int (*argiterator)(void**))
|
||||
|
|
||||
|
|
||||
| Description : Assign the fieldtype to the field and use the iterator
|
||||
| mechanism to get the arguments when a check is
|
||||
| mechanism to get the arguments when a check is
|
||||
| performed.
|
||||
|
|
||||
| Return Values : E_OK if all went well
|
||||
@@ -258,11 +258,11 @@ _nc_set_generic_fieldtype(FIELD *field,
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : WINDOW* _nc_form_cursor(
|
||||
| FORM* form,
|
||||
| int *pRow, int *pCol)
|
||||
|
|
||||
|
|
||||
| Description : Get the current position of the form cursor position
|
||||
| We also return the field window
|
||||
|
|
||||
|
@@ -61,9 +61,9 @@ typedef struct
|
||||
integerPARM;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void *Generic_This_Type( void * arg )
|
||||
|
|
||||
|
|
||||
| Description : Allocate structure for integer type argument.
|
||||
|
|
||||
| Return Values : Pointer to argument structure or NULL on error
|
||||
@@ -88,9 +88,9 @@ Generic_This_Type(void *arg)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void *Make_This_Type( va_list * ap )
|
||||
|
|
||||
|
|
||||
| Description : Allocate structure for integer type argument.
|
||||
|
|
||||
| Return Values : Pointer to argument structure or NULL on error
|
||||
@@ -108,10 +108,10 @@ Make_This_Type(va_list *ap)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void *Copy_This_Type(const void * argp)
|
||||
|
|
||||
| Description : Copy structure for integer type argument.
|
||||
|
|
||||
| Description : Copy structure for integer type argument.
|
||||
|
|
||||
| Return Values : Pointer to argument structure or NULL on error.
|
||||
+--------------------------------------------------------------------------*/
|
||||
@@ -134,9 +134,9 @@ Copy_This_Type(const void *argp)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static void Free_This_Type(void * argp)
|
||||
|
|
||||
|
|
||||
| Description : Free structure for integer type argument.
|
||||
|
|
||||
| Return Values : -
|
||||
@@ -149,11 +149,11 @@ Free_This_Type(void *argp)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static bool Check_This_Field(
|
||||
| FIELD * field,
|
||||
| const void * argp)
|
||||
|
|
||||
|
|
||||
| Description : Validate buffer content to be a valid integer value
|
||||
|
|
||||
| Return Values : TRUE - field is valid
|
||||
@@ -242,11 +242,11 @@ Check_This_Field(FIELD *field, const void *argp)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static bool Check_This_Character(
|
||||
| int c,
|
||||
| const void * argp)
|
||||
|
|
||||
|
|
||||
| Description : Check a character for the integer type.
|
||||
|
|
||||
| Return Values : TRUE - character is valid
|
||||
|
@@ -37,11 +37,11 @@
|
||||
MODULE_ID("$Id: fty_ipv4.c,v 1.10 2009/11/07 20:17:58 tom Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static bool Check_IPV4_Field(
|
||||
| FIELD * field,
|
||||
| const void * argp)
|
||||
|
|
||||
|
|
||||
| Description : Validate buffer content to be a valid IP number (Ver. 4)
|
||||
|
|
||||
| Return Values : TRUE - field is valid
|
||||
@@ -69,11 +69,11 @@ Check_IPV4_Field(FIELD *field, const void *argp GCC_UNUSED)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
| Facility : libnform
|
||||
| Function : static bool Check_IPV4_Character(
|
||||
| int c,
|
||||
| int c,
|
||||
| const void *argp )
|
||||
|
|
||||
|
|
||||
| Description : Check a character for unsigned type or period.
|
||||
|
|
||||
| Return Values : TRUE - character is valid
|
||||
|
Reference in New Issue
Block a user