From 66978c674c48174cab7481f5bcd433cb4084d08b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 08 Sep 2012 18:18:04 -0400 Subject: Use new stack MM in changelog module. --- (limited to 'lib') diff --git a/lib/changelog.sh b/lib/changelog.sh index c4a335b..dc9ace2 100644 --- a/lib/changelog.sh +++ b/lib/changelog.sh @@ -43,30 +43,17 @@ OB_CHANGELOG_DATE= oh_parse_changelog() { - _obpch_file= - _obpch_entry_cb= - _obpch_line_nr= - _obpch_line= - _obpch_line_= - _obpch_expect= - _obpch_blank_lines= - _obpch_entries= - _obpch_source= - _obpch_distribution= - _obpch_version= - _obpch_maintainer= - _obpch_date= + _ob_local _obpch_file _obpch_entry_cb \ + _obpch_line_nr _obpch_line _obpch_line_ \ + _obpch_expect _obpch_blank_lines _obpch_entries \ + _obpch_source _obpch_distribution _obpch_version \ + _obpch_maintainer _obpch_date if [ ${#} -eq 2 ]; then _obpch_file="${1}" _obpch_entry_cb="${2}" else - unset _obpch_file _obpch_entry_cb \ - _obpch_line_nr _obpch_line _obpch_line_ \ - _obpch_expect _obpch_blank_lines _obpch_entries \ - _obpch_source _obpch_distribution _obpch_version \ - _obpch_maintainer _obpch_date - return 125 + return $(_ob_return 125) fi # Parsing logic based on that of dpkg. @@ -153,12 +140,7 @@ ${_obpch_line}" _obpch_entries=$(($_obpch_entries + 1)) "${_obpch_entry_cb}" if [ ${?} -ne 0 ]; then - unset _obpch_file _obpch_entry_cb \ - _obpch_line_nr _obpch_line _obpch_line_ \ - _obpch_expect _obpch_blank_lines _obpch_entries \ - _obpch_source _obpch_distribution _obpch_version \ - _obpch_maintainer _obpch_date - return ${_obpch_entries} + return $(_ob_return ${_obpch_entries}) fi fi _obpch_expect=next_or_eof @@ -190,21 +172,17 @@ ${_obpch_blank_lines}${_obpch_line}" "$(_ob_get_changelog_expect_str "${_obpch_expect}")" fi - unset _obpch_file _obpch_entry_cb \ - _obpch_line_nr _obpch_line _obpch_line_ \ - _obpch_expect _obpch_blank_lines _obpch_entries \ - _obpch_source _obpch_distribution _obpch_version \ - _obpch_maintainer _obpch_date - return ${_obpch_entries} + return $(_ob_return ${_obpch_entries}) } _ob_parse_changelog_error() { + _ob_local _obpche_file _obpche_line_nr _obpche_msg_id \ + _obpche_file_info _obpche_orig_text_domain + _obpche_file="${1}" _obpche_line_nr="${2}" _obpche_msg_id="${3}" - _obpche_file_info= - _obpche_orig_text_domain= shift 3 _obpche_file_info=$(printf '%20s(l%d):' "${_obpche_file}" \ @@ -217,14 +195,12 @@ _ob_parse_changelog_error() ob_set_text_domain "${_obpche_orig_text_domain}" - unset _obpche_file _obpche_line_nr _obpche_msg_id \ - _obpche_file_info _obpche_orig_text_domain= - return 0 + return $(_ob_return 0) } _ob_get_changelog_expect_str() { - _obgces_orig_text_domain= + _ob_local _obgces_orig_text_domain _obgces_orig_text_domain="$(ob_get_text_domain)" ob_set_text_domain 'libopkbuild.1' @@ -233,6 +209,5 @@ _ob_get_changelog_expect_str() ob_set_text_domain "${_obgces_orig_text_domain}" - unset _obgces_orig_text_domain - return 0 + return $(_ob_return 0) } -- cgit v0.9.1