--------------------------------------------------------------------------- | Facility : libnform | Function : static bool Previous_Enum( | FIELD * field, | const void * argp) | | Description : Check for the previous enumeration value | | Return Values : TRUE - previous value found and l
| 249 | | FALSE - no previous value loaded |
| 250 | +--------------------------------------------------------------------------*/ |
| 251 | static bool Previous_Enum(FIELD * field, const void * argp) |
| 252 | { |
| 253 | const enumARG *args = (const enumARG *)argp; |
| 254 | int cnt = args->count; |
| 255 | char **kwds = &args->kwds[cnt-1]; |
| 256 | bool ccase = args->checkcase; |
| 257 | unsigned char *bp = (unsigned char *)field_buffer(field,0); |
| 258 | |
| 259 | if (kwds) { |
| 260 | while(cnt--) |
| 261 | { |
| 262 | if (Compare((unsigned char *)(*kwds--),bp,ccase)==EXACT) |
| 263 | break; |
| 264 | } |
| 265 | |
| 266 | if (cnt<=0) |
| 267 | kwds = &args->kwds[args->count-1]; |
| 268 | |
| 269 | if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT)) |
| 270 | { |
| 271 | set_field_buffer(field,0,*kwds); |
| 272 | return TRUE; |
| 273 | } |
| 274 | } |
| 275 | return FALSE; |
| 276 | } |
| 277 | |
| 278 | |
| 279 | static FIELDTYPE typeENUM = { |
nothing calls this directly
no test coverage detected
searching dependent graphs…