getopt.3 (25bb73e063c17cd9048cf60100dbc0ac5177e94a) | getopt.3 (251c176f415c9dc57b7c8c063aec4208bfc2efa6) |
---|---|
1.\" Copyright (c) 1988, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 158 unchanged lines hidden (view full) --- 167The 168.Va optreset 169variable was added to make it possible to call the 170.Fn getopt 171function multiple times. 172This is an extension to the 173.St -p1003.2 174specification. | 1.\" Copyright (c) 1988, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 158 unchanged lines hidden (view full) --- 167The 168.Va optreset 169variable was added to make it possible to call the 170.Fn getopt 171function multiple times. 172This is an extension to the 173.St -p1003.2 174specification. |
175.Sh EXAMPLE | 175.Sh EXAMPLES |
176.Bd -literal -compact 177int bflag, ch, fd; 178 179bflag = 0; 180while ((ch = getopt(argc, argv, "bf:")) != -1) 181 switch (ch) { 182 case 'b': 183 bflag = 1; --- 83 unchanged lines hidden --- | 176.Bd -literal -compact 177int bflag, ch, fd; 178 179bflag = 0; 180while ((ch = getopt(argc, argv, "bf:")) != -1) 181 switch (ch) { 182 case 'b': 183 bflag = 1; --- 83 unchanged lines hidden --- |