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

Function Next_Enum

Source/CursesDialog/form/fty_enum.c:215–238  ·  view source on GitHub ↗

--------------------------------------------------------------------------- | Facility : libnform | Function : static bool Next_Enum(FIELD * field, | const void * argp) | | Description : Check for the next enumeration value | | Return Values : TRUE - next value found and loaded | FALSE - no next value loaded

Source from the content-addressed store, hash-verified

213| FALSE - no next value loaded
214+--------------------------------------------------------------------------*/
215static bool Next_Enum(FIELD * field, const void * argp)
216{
217 const enumARG *args = (const enumARG *)argp;
218 char **kwds = args->kwds;
219 bool ccase = args->checkcase;
220 int cnt = args->count;
221 unsigned char *bp = (unsigned char *)field_buffer(field,0);
222
223 if (kwds) {
224 while(cnt--)
225 {
226 if (Compare((unsigned char *)(*kwds++),bp,ccase)==EXACT)
227 break;
228 }
229 if (cnt<=0)
230 kwds = args->kwds;
231 if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT))
232 {
233 set_field_buffer(field,0,*kwds);
234 return TRUE;
235 }
236 }
237 return FALSE;
238}
239
240/*---------------------------------------------------------------------------
241| Facility : libnform

Callers

nothing calls this directly

Calls 3

field_bufferFunction · 0.85
CompareFunction · 0.85
set_field_bufferFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…