summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/control.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/control.sh b/lib/control.sh
index 0bdf77c..234a375 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -52,15 +52,18 @@ _ob_parse_control_error()
## @details \fBob_parse_control\fP parses a control file of field names and
## values formatted like RFC 822 (or RFC 2822 or RFC 5322) headers.
## For each field, \fBob_parse_control\fP calls \fIfield_cb\fP with the
-## field name and value as arguments. If \fIreq_fields\fP and
-## \fIopt_fields\fP are given, \fBob_parse_control\fP verifies that the
-## input control file contains all fields listed in \fIreq_fields\fP
-## and no fields that are listed in neither \fIreq_fields\fP nor
-## \fIopt_fields\fP. If \fIfield_cb\fP returns non-zero,
-## \fBob_parse_control\fP stops parsing and immediately returns,
-## without verifying that all required fields were found.
+## field name, the field value, and \fIuser_data\fP as arguments. If
+## \fIreq_fields\fP and \fIopt_fields\fP are given,
+## \fBob_parse_control\fP verifies that the input control file contains
+## all fields listed in \fIreq_fields\fP and no fields that are listed
+## in neither \fIreq_fields\fP nor \fIopt_fields\fP. If \fIfield_cb\fP
+## returns non-zero, \fBob_parse_control\fP stops parsing and
+## immediately returns, without verifying that all required fields were
+## found.
## @operand file req The control file to parse, or "-" for standard input.
-## @operand field_cb req Callback to run for each field.
+## @operand field_cb req Callback to run for each field. Must accept three
+## arguments: the field name, the field value, and
+## \fIuser_data\fP.
## @operand user_data req Data to pass to \fIfield_cb\fP.
## @operand req_fields opt Required fields that must appear in the control file.
## @operand opt_fields opt Optional fields that may appear in the control file.