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

Function Down_Neighbour_Field

Source/CursesDialog/form/frm_driver.c:3041–3073  ·  view source on GitHub ↗

--------------------------------------------------------------------------- | Facility : libnform | Function : static FIELD *Down_Neighbour_Field(FIELD * field) | | Description : Because of the row-major nature of sorting the fields, | its more difficult to define what's the down neighbour | field really means. We define that it must

Source from the content-addressed store, hash-verified

3039
3040 return (field_on_page);
3041}
3042
3043/*---------------------------------------------------------------------------
3044| Facility : libnform
3045| Function : static FIELD *Down_Neighbour_Field(FIELD * field)
3046|
3047| Description : Because of the row-major nature of sorting the fields,
3048| its more difficult to define what's the down neighbour
3049| field really means. We define that it must be on a
3050| 'next' line (cyclic order!) and is the leftmost
3051| field laying on the right side of the given field. If
3052| this set is empty, we take the last field on the line.
3053|
3054| Return Values : Pointer to the upper neighbour field.
3055+--------------------------------------------------------------------------*/
3056static FIELD *Down_Neighbour_Field(FIELD * field)
3057{
3058 FIELD *field_on_page = field;
3059 int frow = field->frow;
3060 int fcol = field->fcol;
3061
3062 /* Walk forward to the 'next' line. The second term in the while clause
3063 just guarantees that we stop if we cycled through the line because
3064 there might be no 'next' line if the page has just one line.
3065 */
3066 do
3067 {
3068 field_on_page = Sorted_Next_Field(field_on_page);
3069 } while(field_on_page->frow==frow && field_on_page->fcol!=fcol);
3070
3071 if (field_on_page->frow!=frow)
3072 { /* We really found a 'next' line. We are positioned at the rightmost
3073 field on this line */
3074 frow = field_on_page->frow;
3075
3076 /* We walk to the right as long as we are really left of the

Callers 1

FN_Down_FieldFunction · 0.85

Calls 2

Sorted_Next_FieldFunction · 0.85
Sorted_Previous_FieldFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…