OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / getsubopt.3
index a63a0b6..fcbd033 100644 (file)
@@ -1,6 +1,7 @@
 .\" 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
@@ -19,8 +20,9 @@
 .\" 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
@@ -66,7 +68,7 @@ that might be passed in
 
 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 .
@@ -103,7 +105,7 @@ When
 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
@@ -124,6 +126,11 @@ is changed, the first suboption before the call to
 .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
@@ -142,7 +149,8 @@ The following program expects suboptions following a "\-o" option.
 #include <assert.h>
 #include <stdio.h>
 
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
 {
     enum {
         RO_OPT = 0,
@@ -222,5 +230,13 @@ int main(int argc, char **argv)
 }
 .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/.