JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... 9, "sep" }, {10, "oct" }, {11, "nov" }, {12, "dec" } }; #define nr_of_months (sizeof(months)/sizeof(months[0])) static int compmi(const void *m1, const void *m2) { const struct mi *mi1 = m1; const struct mi *mi2 = m2; return strcmp(mi1->name, mi2->name ... ); } int main(int argc, char **argv) { qsort(months, nr_of_months, sizeof(months[0]), compmi); for (int i = 1; i < argc; i++) { struct mi key; struct mi *res; key.name = argv[i]; res = bsearch(&key, months, nr_of_mo ... nths, sizeof(months[0]), compmi); if (res == NULL) printf("'%s': unknown month\n", argv[i]); else printf("%s: month #%d\n", res->name, res->nr); } exit(EX ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。