JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... ME_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; break; case RW_OPT: readwrite = 1; break; case ... NAME_OPT: if (value == NULL) { fprintf(stderr, "Missing value for " "suboption '%s'\n", token[NAME_OPT]); errfnd = 1; continue; } name = value; break; default: fprintf(stderr, "No match found " "for token: /%s/\n", value); errfnd = 1; ... ... it(EXIT_FAILURE); } return e; } int main(int argc, char *argv[]) { struct element *first, *elem, *prev; int circular, opt, errfnd; /* The "-c" command-line option can be used to specify that the list is circular */ errfnd = 0; circular = 0; while ((opt ... = getopt(argc, argv, "c")) != -1) { switch (opt) { case 'c': circular = 1; break; default: errfnd = 1; break; } } if (errfnd || optind >= argc) { fprintf(stderr, "Usage: %s [-c] string...\n", argv[0]); exit(EXIT_FAILURE) ... ... it(EXIT_FAILURE); } return e; } int main(int argc, char *argv[]) { struct element *first, *elem, *prev; int circular, opt, errfnd; /* The "-c" command-line option can be used to specify that the list is circular */ errfnd = 0; circular = 0; while ((opt ... = getopt(argc, argv, "c")) != -1) { switch (opt) { case 'c': circular = 1; break; default: errfnd = 1; break; } } if (errfnd || optind >= argc) { fprintf(stderr, "Usage: %s [-c] string...\n", argv[0]); exit(EXIT_FAILURE) ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。