summaryrefslogtreecommitdiffstats
path: root/src/control.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-23 15:50:40 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-23 15:50:40 (EDT)
commitf9b21f929116c9a8e0e34a83d38306b183166d95 (patch)
treebc383db81411b46572f3dfae5da9155290772f33 /src/control.sh
parentf504cf65a1b2fd74614eea99666528845cec773a (diff)
parse_control_error(): Move before use
Diffstat (limited to 'src/control.sh')
-rw-r--r--src/control.sh38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/control.sh b/src/control.sh
index f4d1498..f9b1e08 100644
--- a/src/control.sh
+++ b/src/control.sh
@@ -18,6 +18,25 @@
# along with the ProteanOS Development Kit. If not, see
# <http://www.gnu.org/licenses/>.
+parse_control_error()
+{
+ local file="${1}"
+ local line_nr="${2}"
+ local msg_id="${3}"
+ shift 1
+ local file_info=
+
+ if [ ${line_nr} -eq 0 ]; then
+ file_info="$(printf '%20s:' "${file}")"
+ else
+ file_info="$(printf '%20s(l%d):' "${file}" "${line_nr}")"
+ fi
+
+ warn "${file_info} $(get_msg "${msg_id}")" "${@}"
+
+ return 0
+}
+
parse_control()
{
local field_cb="${2}"
@@ -128,22 +147,3 @@ parse_control()
return 0
}
-
-parse_control_error()
-{
- local file="${1}"
- local line_nr="${2}"
- local msg_id="${3}"
- shift 1
- local file_info=
-
- if [ ${line_nr} -eq 0 ]; then
- file_info="$(printf '%20s:' "${file}")"
- else
- file_info="$(printf '%20s(l%d):' "${file}" "${line_nr}")"
- fi
-
- warn "${file_info} $(get_msg "${msg_id}")" "${@}"
-
- return 0
-}