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

Function Window_To_Buffer

Source/CursesDialog/form/frm_driver.c:381–411  ·  view source on GitHub ↗

--------------------------------------------------------------------------- | Facility : libnform | Function : static void Window_To_Buffer( | WINDOW * win, | FIELD * field) | | Description : Copy the content of the window into the buffer. | The multiple lines of a window

Source from the content-addressed store, hash-verified

379| the window will be replaced by blanks in the buffer.
380|
381| Return Values : -
382+--------------------------------------------------------------------------*/
383static void Window_To_Buffer(WINDOW * win, FIELD * field)
384{
385 int pad;
386 int len = 0;
387 char *p;
388 int row, height, width;
389
390 assert(win && field && field->buf );
391
392 pad = field->pad;
393 p = field->buf;
394 getmaxyx(win, height, width);
395
396 for(row=0; (row < height) && (row < field->drows); row++ )
397 {
398 wmove( win, row, 0 );
399 len += winnstr( win, p+len, field->dcols );
400 }
401 p[len] = '\0';
402
403 /* replace visual padding character by blanks in buffer */
404 if (pad != C_BLANK)
405 {
406 int i;
407 for(i=0; i<len; i++, p++)
408 {
409 if (*p==pad)
410 *p = C_BLANK;
411 }
412 }
413}
414

Callers 3

Synchronize_BufferFunction · 0.85
_nc_Set_Current_FieldFunction · 0.85

Calls 2

wmoveFunction · 0.85
winnstrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…