Validates the current screenint sm_s_val(void);
sm_s_valvalidates all fields and their occurrences, on- and offscreen, that are not protected from validation. Calling this function is equivalent to calling sm_fval for each field and its occurrences. If an occurrence fails validation,
sm_s_valrepositions the cursor to it and displays an error message. If the occurrence is offscreen,
sm_s_valscrolls the array until it is visible. The function then stops validation and returns. Fields that follow the invalid occurrence remain unvalidated.
sm_s_valvalidates array occurrences sequentially, whether onscreen or offscreen. Thus, offscreen occurrences that precede the first onscreen occurrence are validated first.
sm_s_valalso validates groups, grids, and tab cards. A group is validated when its first field would be validated were it not a group member. Fields that are members of a group are not validated individually. A grid is validated after its last field is validated. All fields, grids and tab cards that are on a tab card are validated together and before the card's validation function is called. When a card is validated, offscreen occurrences of fields not on that card may be validated if they are synchronized with fields on the card.
sm_s_valvalidates synchronized arrays by processing parallel occurrences sequentially. The function begins by validating the first occurrence (on- or offscreen) of the array with the lowest base field number, then the first occurrence of the array with the next base field number, and so on.
sm_s_valcompletes validation when it processes the last occurrence of the array with the highest base field number.
For more information about field validation processing, refer to sm_fval.
if (sm_s_val()) // found invalid field data, returned -1
msg err_reset \
"Erroneous data; please correct and save again"
sm_fval, sm_n_gval, sm_validate