From 01cd33a44eaf9f92d748a3b92ff3cd84e8b45454 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 09 Sep 2012 17:10:13 -0400 Subject: Return rather than print value in _ob_return. Don't use _ob_return in command substitutions. Doing so unsets stack variables only in a subshell environment. --- (limited to 'lib/control.sh') diff --git a/lib/control.sh b/lib/control.sh index 99bf2c5..5286a88 100644 --- a/lib/control.sh +++ b/lib/control.sh @@ -39,7 +39,8 @@ ob_parse_control() _obpco_req_fields="${3}" _obpco_opt_fields="${4}" else - return $(_ob_return 125) + _ob_return 125 + return ${?} fi _obpco_all_fields=" ${_obpco_req_fields} ${_obpco_opt_fields} " @@ -85,7 +86,8 @@ ob_parse_control() OB_CONTROL_VALUE="${_obpco_value}" "${_obpco_field_cb}" if [ ${?} -ne 0 ]; then - return $(_ob_return 0) + _ob_return 0 + return ${?} fi else # Continuation line. @@ -111,7 +113,8 @@ ${_line# }" "${_obpco_req_fields}" fi - return $(_ob_return 0) + _ob_return 0 + return ${?} } _ob_parse_control_error() @@ -138,5 +141,6 @@ _ob_parse_control_error() ob_set_text_domain "${_obpcoe_orig_text_domain}" - return $(_ob_return 0) + _ob_return 0 + return ${?} } -- cgit v0.9.1