1 Star 0 Fork 4.9K

罗小黑 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
option.md 3.85 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

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

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

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

const char* option::name

Description:

Long argument name

val

int option::val

Description:

The returned value is determined by flag.

1
https://gitee.com/lawguiren/docs.git
git@gitee.com:lawguiren/docs.git
lawguiren
docs
docs
master

搜索帮助