summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/stdlib/getsubopt.310
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libc/stdlib/getsubopt.3 b/src/lib/libc/stdlib/getsubopt.3
index ef813430de..335a4b9c07 100644
--- a/src/lib/libc/stdlib/getsubopt.3
+++ b/src/lib/libc/stdlib/getsubopt.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: getsubopt.3,v 1.13 2013/06/05 03:39:23 tedu Exp $ 1.\" $OpenBSD: getsubopt.3,v 1.14 2014/11/15 14:41:02 bentley Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1991, 1993 3.\" Copyright (c) 1990, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
29.\" 29.\"
30.\" @(#)getsubopt.3 8.1 (Berkeley) 6/9/93 30.\" @(#)getsubopt.3 8.1 (Berkeley) 6/9/93
31.\" 31.\"
32.Dd $Mdocdate: June 5 2013 $ 32.Dd $Mdocdate: November 15 2014 $
33.Dt GETSUBOPT 3 33.Dt GETSUBOPT 3
34.Os 34.Os
35.Sh NAME 35.Sh NAME
@@ -107,17 +107,17 @@ char *options, *value;
107while ((ch = getopt(argc, argv, "ab:")) != -1) { 107while ((ch = getopt(argc, argv, "ab:")) != -1) {
108 switch (ch) { 108 switch (ch) {
109 case 'a': 109 case 'a':
110 /* process ``a'' option */ 110 /* process "a" option */
111 break; 111 break;
112 case 'b': 112 case 'b':
113 options = optarg; 113 options = optarg;
114 while (*options) { 114 while (*options) {
115 switch (getsubopt(&options, tokens, &value)) { 115 switch (getsubopt(&options, tokens, &value)) {
116 case ONE: 116 case ONE:
117 /* process ``one'' sub option */ 117 /* process "one" sub option */
118 break; 118 break;
119 case TWO: 119 case TWO:
120 /* process ``two'' sub option */ 120 /* process "two" sub option */
121 if (!value) 121 if (!value)
122 error("no value for two"); 122 error("no value for two");
123 i = atoi(value); 123 i = atoi(value);