Add missing opening and closing brackets in getopt_long.3 and getsubopt.3

to make the examples reflect reality more closely.

MFC after:	1 week
X-MFC-After:	9.0-RELEASE
This commit is contained in:
Glen Barber 2011-12-26 03:14:37 +00:00
parent 5b7b8966c1
commit bd45f5676d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228885
2 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,7 @@
.\" @(#)getopt.3 8.5 (Berkeley) 4/27/95
.\" $FreeBSD$
.\"
.Dd April 1, 2000
.Dd December 25, 2011
.Dt GETOPT_LONG 3
.Os
.Sh NAME
@ -239,7 +239,7 @@ static struct option longopts[] = {
};
bflag = 0;
while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1)
while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1) {
switch (ch) {
case 'b':
bflag = 1;
@ -256,6 +256,7 @@ while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1)
break;
default:
usage();
}
}
argc -= optind;
argv += optind;

View File

@ -28,7 +28,7 @@
.\" @(#)getsubopt.3 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
.Dd June 9, 1993
.Dd December 25, 2011
.Dt GETSUBOPT 3
.Os
.Sh NAME
@ -131,9 +131,11 @@ while ((ch = getopt(argc, argv, "ab:")) != \-1) {
else
error("missing sub option");
break;
}
}
break;
}
}
.Ed
.Sh SEE ALSO
.Xr getopt 3 ,