MCPcopy Create free account
hub / github.com/Kitware/CMake / set_current_field

Function set_current_field

Source/CursesDialog/form/fld_current.c:49–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47| E_SYSTEM_ERROR - system error
48+--------------------------------------------------------------------------*/
49int set_current_field(FORM * form, FIELD * field)
50{
51 int err = E_OK;
52
53 if ( !form || !field )
54 RETURN(E_BAD_ARGUMENT);
55
56 if ( (form != field->form) || Field_Is_Not_Selectable(field) )
57 RETURN(E_REQUEST_DENIED);
58
59 if (!(form->status & _POSTED))
60 {
61 form->current = field;
62 form->curpage = field->page;
63 }
64 else
65 {
66 if (form->status & _IN_DRIVER)
67 err = E_BAD_STATE;
68 else
69 {
70 if (form->current != field)
71 {
72 if (!_nc_Internal_Validation(form))
73 err = E_INVALID_FIELD;
74 else
75 {
76 Call_Hook(form,fieldterm);
77 if (field->page != form->curpage)
78 {
79 Call_Hook(form,formterm);
80 err = _nc_Set_Form_Page(form,field->page,field);
81 Call_Hook(form,forminit);
82 }
83 else
84 {
85 err = _nc_Set_Current_Field(form,field);
86 }
87 Call_Hook(form,fieldinit);
88 _nc_Refresh_Current_Field(form);
89 }
90 }
91 }
92 }
93 RETURN(err);
94}
95
96/*---------------------------------------------------------------------------
97| Facility : libnform

Callers 2

HandleInputMethod · 0.85
HandleInputMethod · 0.85

Calls 4

_nc_Internal_ValidationFunction · 0.85
_nc_Set_Form_PageFunction · 0.85
_nc_Set_Current_FieldFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…