Lely core libraries 2.3.4
|
This header file is part of the C11 and POSIX compatibility library; it includes <unistd.h>
, if it exists, and defines any missing functionality.
More...
#include <lely/features.h>
Go to the source code of this file.
Functions | |
int | getopt (int argc, char *const argv[], const char *optstring) |
Parses options passed as arguments to main() . | |
unsigned | sleep (unsigned seconds) |
Sleeps until the specified number of realtime seconds has elapsed or the calling thread is interrupted. | |
Variables | |
char * | optarg |
A pointer to the argument of the current option. | |
int | optind |
The index of the next argument to be parsed by getopt(). | |
int | opterr |
A flag indicating whether a diagnostic message should be printed if an unknown option character or missing argument is detected by getopt(). | |
int | optopt |
The last option character to cause an error. | |
This header file is part of the C11 and POSIX compatibility library; it includes <unistd.h>
, if it exists, and defines any missing functionality.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file unistd.h.
int getopt | ( | int | argc, |
char *const | argv[], | ||
const char * | optstring | ||
) |
Parses options passed as arguments to main()
.
argc | the argument count as passed to main() . |
argv | the argument array as passed to main() . |
optstring | a pointer to a string of recognized option characters; if a character is followed by a colon, the option takes an argument. If the first character is a colon, this function returns ':' instead of '?' when a missing argument is detected and does not print a diagnostic message (regardless of the value of opterr). |
unsigned sleep | ( | unsigned | seconds | ) |
Sleeps until the specified number of realtime seconds has elapsed or the calling thread is interrupted.