.\" Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
.\" and Copyright (C) 2007 Justin Pryzby <pryzbyj@justinpryzby.com>
.\"
+.\" %%%LICENSE_START(PERMISSIVE_MISC)
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
.\" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\" %%%LICENSE_END
.\"
-.TH GETSUBOPT 3 2010-09-26 "GNU" "Linux Programmer's Manual"
+.TH GETSUBOPT 3 2014-04-08 "GNU" "Linux Programmer's Manual"
.SH NAME
getsubopt \- parse suboption arguments from a string
.SH SYNOPSIS
The
.I tokens
-argument is a pointer to a NULL-terminated list of the tokens that
+argument is a pointer to a NULL-terminated array of pointers to the tokens that
.BR getsubopt ()
will look for in
.IR optionp .
returns,
.I optionp
points to the next suboption,
-or to the null byte ('\\0') at the end of the
+or to the null byte (\(aq\\0\(aq) at the end of the
string if the last suboption was just processed.
.SH RETURN VALUE
If the first suboption in
.BR getsubopt ()
is not (necessarily) the same as the first suboption after
.BR getsubopt ().
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR getsubopt ()
+function is thread-safe.
.SH CONFORMING TO
POSIX.1-2001.
.SH NOTES
#include <assert.h>
#include <stdio.h>
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
enum {
RO_OPT = 0,
}
.fi
.SH SEE ALSO
-.BR getopt (3),
-.BR feature_test_macros (7)
+.BR getopt (3)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.