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

Function Buffer_To_Window

Source/CursesDialog/form/frm_driver.c:345–366  ·  view source on GitHub ↗

--------------------------------------------------------------------------- | Facility : libnform | Function : static void Buffer_To_Window( | const FIELD * field, | WINDOW * win) | | Description : Copy the buffer to the window. If its a multiline | field, the buffer is split to

Source from the content-addressed store, hash-verified

343| window without any editing.
344|
345| Return Values : -
346+--------------------------------------------------------------------------*/
347static void Buffer_To_Window(const FIELD * field, WINDOW * win)
348{
349 int width, height;
350 int len;
351 int row;
352 char *pBuffer;
353
354 assert(win && field);
355
356 getmaxyx(win, height, width);
357
358 for(row=0, pBuffer=field->buf;
359 row < height;
360 row++, pBuffer += width )
361 {
362 if ((len = (int)( After_End_Of_Data( pBuffer, width ) - pBuffer )) > 0)
363 {
364 wmove( win, row, 0 );
365 waddnstr( win, pBuffer, len );
366 }
367 }
368}
369

Callers 5

Field_GrownFunction · 0.85
Display_Or_Erase_FieldFunction · 0.85
Synchronize_FieldFunction · 0.85
_nc_Set_Current_FieldFunction · 0.85

Calls 3

After_End_Of_DataFunction · 0.85
wmoveFunction · 0.85
waddnstrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…