JM Project

JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。

Linux マニュアル 一覧

全文・高度検索

per page, with , order by , clip by
Results of 1 - 1 of about 1 for subopts (0.000 sec.)
Man page of GETSUBOPT 9414
GETSUBOPT Section: Linux Programmer's Manual (3) Updated: 2020-06-09 Index JM Home Page 名前 getsubopt - 文字列中のサブオプション引数の解釈を行う 書式 #include < stdlib.h > int getsubopt(char ** optionp , char * const * tokens , char ** val ... _OPT = 0, RW_OPT, NAME_OPT }; char *const token[] = { [RO_OPT] = "ro", [RW_OPT] = "rw", [NAME_OPT] = "name", NULL }; char *subopts; char *value; int opt; int readonly = 0; int readwrite = 0; char *name = NULL; int errfnd = 0; while ((opt = getopt(argc, ... argv, "o:")) != -1) { switch (opt) { case 'o': subopts = optarg; while (*subopts != '\0' && !errfnd) { switch (getsubopt(&subopts, token, &value)) { case RO_OPT: readonly = 1; b ... token[RW_OPT]); errfnd = 1; } break; default: errfnd = 1; } } if (errfnd || argc == 1) { fprintf(stderr, "\nUsage: %s -o <suboptstring>\n", argv[0]); fprintf(stderr, "suboptions are 'ro', 'rw', " "and 'name=<value>'\n"); exit(EXIT_FAILURE); } /* Remain ...
https://man.mtool.work/man/20260915/man3/getsubopt.3.html
PREV 1 NEXT

リンク

日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。