--------------------------------------------------------------------------- | Facility : libnform | Function : static int Associate_Fields(FORM *form, FIELD **fields) | | Description : Set association between form and array of fields. | If there are fields, position to first active field. | | Return Values : E_OK - success |
| 247 | | Return Values : E_OK - success |
| 248 | | any other - error occurred |
| 249 | +--------------------------------------------------------------------------*/ |
| 250 | INLINE static int Associate_Fields(FORM *form, FIELD **fields) |
| 251 | { |
| 252 | int res = Connect_Fields(form,fields); |
| 253 | if (res == E_OK) |
| 254 | { |
| 255 | if (form->maxpage>0) |
| 256 | { |
| 257 | form->curpage = 0; |
| 258 | form_driver(form,FIRST_ACTIVE_MAGIC); |
| 259 | } |
| 260 | else |
| 261 | { |
| 262 | form->curpage = -1; |
| 263 | form->current = (FIELD *)0; |
| 264 | } |
| 265 | } |
| 266 | return(res); |
| 267 | } |
| 268 | |
| 269 | /*--------------------------------------------------------------------------- |
no test coverage detected
searching dependent graphs…