33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
|
|
From 86bb2d971bd86581180a4e2ee2707fb884bed001 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Felipe Gasper <felipe@felipegasper.com>
|
||
|
|
Date: Sat, 29 Oct 2022 21:12:07 -0400
|
||
|
|
Subject: [PATCH] Fix poptCallbackType documentation.
|
||
|
|
|
||
|
|
Issue #87
|
||
|
|
---
|
||
|
|
popt.3 | 7 +++++--
|
||
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/popt.3 b/popt.3
|
||
|
|
index 14b6d569..a490d4bc 100644
|
||
|
|
--- a/popt.3
|
||
|
|
+++ b/popt.3
|
||
|
|
@@ -246,12 +246,15 @@ Option callbacks should match the following prototype:
|
||
|
|
.sp
|
||
|
|
.nf
|
||
|
|
.BI "void poptCallbackType(poptContext con,
|
||
|
|
+.BI " enum poptCallbackReason reason,
|
||
|
|
.BI " const struct poptOption * opt,
|
||
|
|
-.BI " const char * arg, void * data);
|
||
|
|
+.BI " const char * arg, const void * data);
|
||
|
|
.fi
|
||
|
|
.sp
|
||
|
|
The first parameter is the context which is being parsed (see the next
|
||
|
|
-section for information on contexts), \fIopt\fR points to the option
|
||
|
|
+section for information on contexts). \fIreason\fR is
|
||
|
|
+\fBPOPT_CALLBACK_REASON_PRE\fR, \fBPOPT_CALLBACK_REASON_POST\fR, or
|
||
|
|
+\fBPOPT_CALLBACK_REASON_OPTION\fR. \fIopt\fR points to the option
|
||
|
|
which triggered this callback, and \fIarg\fR is the option's argument.
|
||
|
|
If the option does not take an argument, \fIarg\fR is \fBNULL\fR. The
|
||
|
|
final parameter, \fIdata\fR is taken from the \fIdescrip\fR field
|