diff options
author | rnordier <rnordier@FreeBSD.org> | 1998-05-04 23:16:50 +0000 |
---|---|---|
committer | rnordier <rnordier@FreeBSD.org> | 1998-05-04 23:16:50 +0000 |
commit | f35a3f07ec8833eac074dcca46cdffc7fd1f2efe (patch) | |
tree | 89bed796b33168c281060b7eeae1c06102cfd11a /lib/libc | |
parent | bb6e1ba0c0c992a86f3ea0695bfa3370104b6da4 (diff) | |
download | FreeBSD-src-f35a3f07ec8833eac074dcca46cdffc7fd1f2efe.zip FreeBSD-src-f35a3f07ec8833eac074dcca46cdffc7fd1f2efe.tar.gz |
Fix a few nits in quoted code fragments and elsewhere.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/getopt.3 | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3 index 4be47a9..595e3f3 100644 --- a/lib/libc/stdlib/getopt.3 +++ b/lib/libc/stdlib/getopt.3 @@ -130,7 +130,7 @@ by the option .Ql -- (double dash) which causes .Fn getopt -to signal the end of argument processing and returns \-1. +to signal the end of argument processing and return \-1. When all options have been processed (i.e., up to the first non-option argument), .Fn getopt @@ -177,7 +177,7 @@ int bflag, ch, fd; bflag = 0; while ((ch = getopt(argc, argv, "bf:")) != -1) - switch(ch) { + switch (ch) { case 'b': bflag = 1; break; @@ -247,8 +247,8 @@ The following code fragment works in most cases. int length; char *p; -while ((c = getopt(argc, argv, "0123456789")) != -1) - switch (c) { +while ((ch = getopt(argc, argv, "0123456789")) != -1) + switch (ch) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': p = argv[optind - 1]; @@ -258,5 +258,4 @@ while ((c = getopt(argc, argv, "0123456789")) != -1) length = atoi(argv[optind] + 1); break; } -} .Ed |