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

Function FE_Insert_Line

Source/CursesDialog/form/frm_driver.c:2334–2358  ·  view source on GitHub ↗

--------------------------------------------------------------------------- | Facility : libnform | Function : static int FE_Insert_Line(FORM * form) | | Description : Insert a blank line at the cursor position | | Return Values : E_OK - success | E_REQUEST_DENIED - line can not be inserted +-------------------------------------------

Source from the content-addressed store, hash-verified

2332}
2333
2334/*---------------------------------------------------------------------------
2335| Facility : libnform
2336| Function : static int FE_Insert_Line(FORM * form)
2337|
2338| Description : Insert a blank line at the cursor position
2339|
2340| Return Values : E_OK - success
2341| E_REQUEST_DENIED - line can not be inserted
2342+--------------------------------------------------------------------------*/
2343static int FE_Insert_Line(FORM * form)
2344{
2345 FIELD *field = form->current;
2346 int result = E_REQUEST_DENIED;
2347
2348 if (Check_Char(field->type,(int)C_BLANK,(TypeArgument *)(field->arg)))
2349 {
2350 bool Maybe_Done = (form->currow!=(field->drows-1)) &&
2351 Is_There_Room_For_A_Line(form);
2352
2353 if (!Single_Line_Field(field) &&
2354 (Maybe_Done || Growable(field)))
2355 {
2356 if (!Maybe_Done && !Field_Grown(field,1))
2357 result = E_SYSTEM_ERROR;
2358 else
2359 {
2360 form->curcol = 0;
2361 winsertln(form->w);

Callers

nothing calls this directly

Calls 4

Check_CharFunction · 0.85
Is_There_Room_For_A_LineFunction · 0.85
Field_GrownFunction · 0.85
winsertlnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…