summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-08 18:15:37 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-08 18:15:37 (EDT)
commitcf9e74f227d179bb3303dacb7600bac66e83bf9f (patch)
treed6a8cf9c4b938d1b12c207dbcc509ff004daf52b /lib
parent6f562387da16be19f8cac301a045c9a8c85e5e39 (diff)
Use new stack MM in control module.
Diffstat (limited to 'lib')
-rw-r--r--lib/control.sh38
1 files changed, 10 insertions, 28 deletions
diff --git a/lib/control.sh b/lib/control.sh
index d45aa21..99bf2c5 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -29,16 +29,9 @@ OB_CONTROL_VALUE=
ob_parse_control()
{
- _obpco_file=
- _obpco_field_cb=
- _obpco_req_fields=
- _obpco_opt_fields=
- _obpco_all_fields=
- _obpco_got_fields=
- _obpco_line_nr=
- _obpco_line=
- _obpco_name=
- _obpco_value=
+ _ob_local _obpco_file _obpco_field_cb _obpco_req_fields _obpco_opt_fields \
+ _obpco_all_fields _obpco_got_fields \
+ _obpco_line_nr _obpco_line _obpco_name _obpco_value
if [ ${#} -eq 4 ]; then
_obpco_file="${1}"
@@ -46,10 +39,7 @@ ob_parse_control()
_obpco_req_fields="${3}"
_obpco_opt_fields="${4}"
else
- unset _obpco_file _obpco_field_cb _obpco_req_fields _obpco_opt_fields \
- _obpco_all_fields _obpco_got_fields \
- _obpco_line_nr _obpco_line _obpco_name _obpco_value
- return 125
+ return $(_ob_return 125)
fi
_obpco_all_fields=" ${_obpco_req_fields} ${_obpco_opt_fields} "
@@ -95,11 +85,7 @@ ob_parse_control()
OB_CONTROL_VALUE="${_obpco_value}"
"${_obpco_field_cb}"
if [ ${?} -ne 0 ]; then
- unset _obpco_file _obpco_field_cb \
- _obpco_req_fields _obpco_opt_fields \
- _obpco_all_fields _obpco_got_fields \
- _obpco_line_nr _obpco_line _obpco_name _obpco_value
- return 0
+ return $(_ob_return 0)
fi
else
# Continuation line.
@@ -125,19 +111,17 @@ ${_line# }"
"${_obpco_req_fields}"
fi
- unset _obpco_file _obpco_field_cb _obpco_req_fields _obpco_opt_fields \
- _obpco_all_fields _obpco_got_fields \
- _obpco_line_nr _obpco_line _obpco_name _obpco_value
- return 0
+ return $(_ob_return 0)
}
_ob_parse_control_error()
{
+ _ob_local _obpcoe_file _obpcoe_line_nr _obpcoe_msg_id \
+ _obpcoe_file_info _obpcoe_orig_text_domain
+
_obpcoe_file="${1}"
_obpcoe_line_nr="${2}"
_obpcoe_msg_id="${3}"
- _obpcoe_file_info=
- _obpcoe_orig_text_domain=
shift 3
if [ "${_obpcoe_line_nr}" -eq 0 ]; then
@@ -154,7 +138,5 @@ _ob_parse_control_error()
ob_set_text_domain "${_obpcoe_orig_text_domain}"
- unset _obpcoe_file _obpcoe_line_nr _obpcoe_msg_id \
- _obpcoe_file_info _obpcoe_orig_text_domain
- return 0
+ return $(_ob_return 0)
}