option

    UTILS

    Description:

    Defines the command parsing option.

    Summary

    Data Fields

    Field Documentation

    flag

    Description:

    Determines the returned value of the getopt() function. If flag is NULL, the 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.

    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

    Description:

    Long argument name

    val

    The returned value is determined by flag.