Print this page
9659 Missing man page for getopt_long(3C)


  26 .\"
  27 .\" The contents of this file are subject to the terms of the
  28 .\" Common Development and Distribution License (the "License").
  29 .\" You may not use this file except in compliance with the License.
  30 .\"
  31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  32 .\" or http://www.opensolaris.org/os/licensing.
  33 .\" See the License for the specific language governing permissions
  34 .\" and limitations under the License.
  35 .\"
  36 .\" When distributing Covered Code, include this CDDL HEADER in each
  37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  38 .\" If applicable, add the following below this CDDL HEADER, with the
  39 .\" fields enclosed by brackets "[]" replaced with your own identifying
  40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41 .\"
  42 .\"
  43 .\" Copyright 1989 AT&T
  44 .\" Copyright (c) 2001, The IEEE and The Open Group.  All Rights Reserved.
  45 .\" Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved.

  46 .\"
  47 .TH GETOPT 3C "Oct 16, 2007"
  48 .SH NAME
  49 getopt \- command option parsing
  50 .SH SYNOPSIS
  51 .SS "SVID3, XPG3"
  52 .LP
  53 .nf
  54 #include <stdio.h>
  55 
  56 \fBint\fR \fBgetopt\fR(\fBint\fR \fIargc\fR, \fBchar * const\fR \fIargv\fR[], \fBconst char *\fR\fIoptstring\fR);
  57 .fi
  58 
  59 .LP
  60 .nf
  61 \fBextern char *\fR\fIoptarg\fR;
  62 .fi
  63 
  64 .LP
  65 .nf
  66 \fBextern int\fR \fIoptind\fR, \fIopterr\fR, \fIoptopt\fR;
  67 .fi


 437 
 438 .sp
 439 .TS
 440 box;
 441 c | c
 442 l | l .
 443 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 444 _
 445 Interface Stability     Committed
 446 _
 447 MT-Level        Unsafe
 448 _
 449 Standard        See below.
 450 .TE
 451 
 452 .sp
 453 .LP
 454 For the Basic Utility Command syntax is Standard, see \fBstandards\fR(5).
 455 .SH SEE ALSO
 456 .LP
 457 \fBIntro\fR(1), \fBgetopt\fR(1), \fBgetopts\fR(1), \fBgetsubopt\fR(3C),
 458 \fBgettext\fR(3C), \fBsetlocale\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
 459 \fBstandards\fR(5)


  26 .\"
  27 .\" The contents of this file are subject to the terms of the
  28 .\" Common Development and Distribution License (the "License").
  29 .\" You may not use this file except in compliance with the License.
  30 .\"
  31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  32 .\" or http://www.opensolaris.org/os/licensing.
  33 .\" See the License for the specific language governing permissions
  34 .\" and limitations under the License.
  35 .\"
  36 .\" When distributing Covered Code, include this CDDL HEADER in each
  37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  38 .\" If applicable, add the following below this CDDL HEADER, with the
  39 .\" fields enclosed by brackets "[]" replaced with your own identifying
  40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41 .\"
  42 .\"
  43 .\" Copyright 1989 AT&T
  44 .\" Copyright (c) 2001, The IEEE and The Open Group.  All Rights Reserved.
  45 .\" Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved.
  46 .\" Copyright 2018 Jason King
  47 .\"
  48 .TH GETOPT 3C "July 17, 2018"
  49 .SH NAME
  50 getopt \- command option parsing
  51 .SH SYNOPSIS
  52 .SS "SVID3, XPG3"
  53 .LP
  54 .nf
  55 #include <stdio.h>
  56 
  57 \fBint\fR \fBgetopt\fR(\fBint\fR \fIargc\fR, \fBchar * const\fR \fIargv\fR[], \fBconst char *\fR\fIoptstring\fR);
  58 .fi
  59 
  60 .LP
  61 .nf
  62 \fBextern char *\fR\fIoptarg\fR;
  63 .fi
  64 
  65 .LP
  66 .nf
  67 \fBextern int\fR \fIoptind\fR, \fIopterr\fR, \fIoptopt\fR;
  68 .fi


 438 
 439 .sp
 440 .TS
 441 box;
 442 c | c
 443 l | l .
 444 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 445 _
 446 Interface Stability     Committed
 447 _
 448 MT-Level        Unsafe
 449 _
 450 Standard        See below.
 451 .TE
 452 
 453 .sp
 454 .LP
 455 For the Basic Utility Command syntax is Standard, see \fBstandards\fR(5).
 456 .SH SEE ALSO
 457 .LP
 458 \fBIntro\fR(1), \fBgetopt\fR(1), \fBgetopts\fR(1), \fBgetopt_long\fR(3C),
 459 \fBgetsubopt\fR(3C), \fBgettext\fR(3C), \fBsetlocale\fR(3C), \fBattributes\fR(5),
 460 \fBenviron\fR(5), \fBstandards\fR(5)