getsubopt man page on Tru64

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
Tru64 logo
[printable version]

getsubopt(3)							  getsubopt(3)

NAME
       getsubopt - Parse suboption arguments from a command line

SYNOPSIS
       #include <stdlib.h>

       int getsubopt(
	       char **optionp,
	       char *tokens[],
	       char **valuep );

LIBRARY
       Standard C Library (libc)

STANDARDS
       Interfaces  documented on this reference page conform to industry stan‐
       dards as follows:

       getsubopt():  XPG4-UNIX

       Refer to the standards(5) reference page	 for  more  information	 about
       industry standards and associated tags.

PARAMETERS
       Specifies  the address of a pointer to the option string.  Specifies an
       array of possible suboption tokens.  Specifies the address of  a	 value
       string pointer.

DESCRIPTION
       The  getsubopt()	 function parses suboption arguments in a option argu‐
       ment that was initially parsed by the getopt() function.	 These	subop‐
       tion  arguments must be separated by commas and may consist of either a
       single token, or a token-value pair separated by an equal sign. Because
       commas delimit suboption arguments in the option string, commas are not
       allowed to be part of the suboption arguments or the value of a	subop‐
       tion  argument.	 Similarly,  because  the equal sign separates a token
       from its value, a token must not contain an equal sign.

       The following command line for the mount command gives  an  example  of
       this syntax: mount -o ro,nosuid,rsize=8192 paradox:/u2 /u2

       In  this	 example,  the	suboption  consists of three arguments: ro and
       nosuid (tokens), and rsize=8192 (a token-value pair).

       When a suboption argument is found in the *optionp string that  matches
       a  string  in  the token array, the index of the matching string in the
       array is returned. If no match is found, then a -1 is  returned.	 After
       each  match,  the  *optionp string is updated to point past the matched
       suboption argument to the next suboption argument in the list.  If  the
       suboption  argument  matched is the last in the string, *optionp is set
       to the null pointer.  If the suboption argument	matched	 is  a	token-
       value  pair,  then *valuep is set to point to the value. If there is no
       value, then *valuep is to the null pointer.

       The token array is a list of pointers to strings.  The end of the array
       is signified by a NULL pointer.

RETURN VALUES
       Upon  successful completion, the getsubopt() function returns the index
       of the token or suboption argument that matches the suboption  argument
       in  the	input  string.	Otherwise,  if no match is found, it returns a
       value of -1.

ERRORS
       No errors are defined for this routine.

SEE ALSO
       Functions: getopt(3)

       Standards: standards(5)

								  getsubopt(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Tru64

List of man pages available for Tru64

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net