JM Project

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

Linux マニュアル 一覧

全文・高度検索

per page, with , order by , clip by
Results of 1 - 1 of about 1 for compmi (0.000 sec.)
Man page of BSEARCH 9414
BSEARCH Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page 名前 bsearch - ソートされた配列を二分木検索 (binary search) する 書式 #include < stdlib.h > void *bsearch(const void * key , const void * base , size_t nm ... 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 ...
https://man.mtool.work/man/20260915/man3/bsearch.3.html
PREV 1 NEXT

リンク

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