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

Function Synchronize_Field

Source/CursesDialog/form/frm_driver.c:912–941  ·  view source on GitHub ↗

--------------------------------------------------------------------------- | Facility : libnform | Function : static int Synchronize_Field(FIELD * field) | | Description : Synchronize the windows content with the value in | the buffer. | | Return Values : E_OK - success | E_BAD_ARGUMENT - invalid field pointer

Source from the content-addressed store, hash-verified

910| Return Values : E_OK - success
911| E_BAD_ARGUMENT - invalid field pointer
912| E_SYSTEM_ERROR - some severe basic error
913+--------------------------------------------------------------------------*/
914static int Synchronize_Field(FIELD * field)
915{
916 FORM *form;
917 int res = E_OK;
918
919 if (!field)
920 return(E_BAD_ARGUMENT);
921
922 if (((form=field->form) != (FORM *)0)
923 && Field_Really_Appears(field))
924 {
925 if (field == form->current)
926 {
927 form->currow = form->curcol = form->toprow = form->begincol = 0;
928 werase(form->w);
929
930 if ( (field->opts & O_PUBLIC) && Justification_Allowed(field) )
931 Undo_Justification( field, form->w );
932 else
933 Buffer_To_Window( field, form->w );
934
935 field->status |= _NEWTOP;
936 res = _nc_Refresh_Current_Field( form );
937 }
938 else
939 res = Display_Field( field );
940 }
941 field->status |= _CHANGED;
942 return(res);
943}
944

Callers 2

set_field_bufferFunction · 0.85

Calls 4

weraseFunction · 0.85
Undo_JustificationFunction · 0.85
Buffer_To_WindowFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…