--------------------------------------------------------------------------- | 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
| 910 | | Return Values : E_OK - success |
| 911 | | E_BAD_ARGUMENT - invalid field pointer |
| 912 | | E_SYSTEM_ERROR - some severe basic error |
| 913 | +--------------------------------------------------------------------------*/ |
| 914 | static 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 |
no test coverage detected
searching dependent graphs…