diff options
Diffstat (limited to 'eshtrans')
-rw-r--r-- | eshtrans/eshrt/eshrtbegin.esh | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/eshtrans/eshrt/eshrtbegin.esh b/eshtrans/eshrt/eshrtbegin.esh index eb0d517..23cf542 100644 --- a/eshtrans/eshrt/eshrtbegin.esh +++ b/eshtrans/eshrt/eshrtbegin.esh @@ -69,29 +69,25 @@ __frame_get() __fn_ctxsw() { unset IFS - case "${__prev_tu}" in - ${__fn_tu});; - ?*) - # Unset static variables and functions from previous TU. - eval "__val=\${__${__prev_tu}_static_vars}" - case "${__val}" in ?*) - eval "unset \${__${__prev_tu}_static_vars}" - ;; esac - eval "__val=\${__${__prev_tu}_static_fns}" - for __fn in ${__val}; do - unset -f "${__fn%:*}" - done + case "${__prev_tu}" in ${__fn_tu});; ?*) + # Unset static variables and functions from previous TU. + eval "__val=\${__${__prev_tu}_static_vars}" + case "${__val}" in ?*) + eval "unset \${__${__prev_tu}_static_vars}" + ;; esac + eval "__val=\${__${__prev_tu}_static_fns}" + for __fn in ${__val}; do + unset -f "${__fn%:*}" + done ;; esac - case "${__fn_tu}" in - ${__prev_tu});; - ?*) - # Set static variables and function for the current TU. - eval "__val=\${__${__fn_tu}_static_var_vals}" - eval "${__val}" - eval "__val=\${__${__fn_tu}_static_fns}" - for __fn in ${__val}; do - eval "${__fn%:*}() { ${__fn#*:}; }" - done + case "${__fn_tu}" in ${__prev_tu});; ?*) + # Set static variables and function for the current TU. + eval "__val=\${__${__fn_tu}_static_var_vals}" + eval "${__val}" + eval "__val=\${__${__fn_tu}_static_fns}" + for __fn in ${__val}; do + eval "${__fn%:*}() { ${__fn#*:}; }" + done ;; esac case "${__prev_vars}" in ?*) unset ${__prev_vars} |