resetAnswer() { mkrecord "${1}" if [[ "_${FUNCTION}" = "_delete" ]] then removeRecord "table${LABDAT}0" return 0 fi RECORD_OLD="${RECORD}" while : do mvclrtoeol "$(( ${1} + 6 ))" 46 refresh LTC="$( getstr )" [[ "_${LTC}" = "_" ]] && LTC="0" [[ "_${LTC}" = "_0" ]] && mkrecord "${1}" && break [[ "_${LTC}" = *[!0-9]* ]] || continue if (( ${LTC} == -1 )) then LTC="$(( ${1} + 1 ))" refresh "e${LABEL}" putAnswer ${1} fi (( ${LTC} >= 1 )) && (( ${LTC} <= ${1} )) && mvclrtoeol "$(( 4 + ${LTC} ))" 46 && refresh && ANS="$( getstr )" && eval ANS\[\${LTC}\]=\"${ANS}\" done if [[ "_${RECORD}" != "_${RECORD_OLD}" || "${FUNCTION}" != @(modify|config) ]] then if saveRecord "table${LABDAT}0" then RECORD="${RECORD_OLD}" [[ "${FUNCTION}" = @(modify|config) ]] && removeRecord "table${LABDAT}0" fi else attrset rev attrset blink mvaddstr ${MAX_LINES} 1 "Record is unchanged" refresh sleep 2 attroff refresh fi return 0 }