option

Overview

Related Modules:

UTILS

Description:

Defines the command parsing option.

Summary

Data Fields

Variable Name

Description

name

const char  

has_arg

int 

flag

int  

val

int 

Details

Field Documentation

flag

  1. int* option::flag

Description:

Determines the returned value of the getopt() function. If flag is NULL, the getopt() function returns the val value that matches the option. If flag is not NULL, assign the val value to the memory to which flag points, and set the returned value to 0.

has_arg

  1. int option::has_arg

Description:

has_arg has three values. 0 indicates that the argument is not followed by an argument value, 1 indicates that the argument must be followed by an argument value, and 2 indicates that the argument can be followed or not followed by an argument value.

name

  1. constchar* option::name

Description:

Long argument name

val

  1. int option::val

Description:

The returned value is determined by flag.