X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fplist.c;h=8cda7b9fb01131eb66f86218b3aeb7fbea29605d;hb=38c091dbfa19be7db173231b0b5101577de2098e;hp=f798ee5c22a925ee29ede56d559c044650ef1d52;hpb=45e5ec16068aec42d4547ee5cb1871a63c6ee195;p=m17n%2Fm17n-lib.git diff --git a/src/plist.c b/src/plist.c index f798ee5..8cda7b9 100644 --- a/src/plist.c +++ b/src/plist.c @@ -1204,10 +1204,18 @@ mplist_get (MPlist *plist, MSymbol key) /***en @brief Set the value (function pointer) of a property in a property list. - The mplist_put_func () function is like mplist_put () but for - settting function pointer $FUNC in property list $PLIST for key + The mplist_put_func () function is similar to mplist_put () but for + setting function pointer $FUNC in property list $PLIST for key $KEY. */ +/***ja + @brief ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥ÈÃæ¤Î¥×¥í¥Ñ¥Æ¥£¤Ë´Ø¿ô¥Ý¥¤¥ó¥¿¤Ç¤¢¤ëÃͤòÀßÄꤹ¤ë. + + ´Ø¿ô mplist_put_func () ¤Ï´Ø¿ô mplist_put () ƱÍÍ¡¢¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È $PLIST + Ãæ¤Ç¥­¡¼¤¬ $KEY ¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ËÃͤòÀßÄꤹ¤ë¡£Ã¢¤·¤½¤ÎÃͤϴؿô¥Ý¥¤¥ó¥¿ + $FUNC ¤Ç¤¢¤ë¡£ */ + + /*** @seealso mplist_put (), M17N_FUNC () */ @@ -1238,22 +1246,24 @@ mplist_put_func (MPlist *plist, MSymbol key, M17NFunc func) /***en @brief Get the value (function pointer) of a property in a property list. - The mplist_get_func () funciont is like mplist_get () but for + The mplist_get_func () function is similar to mplist_get () but for getting a function pointer from property list $PLIST by key $KEY. */ +/***ja + @brief ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤«¤é¥×¥í¥Ñ¥Æ¥£¤Î´Ø¿ô¥Ý¥¤¥ó¥¿¤Ç¤¢¤ëÃͤòÆÀ¤ë. + + ´Ø¿ô mplist_get_func () ¤Ï´Ø¿ô mplist_get () ¤ÈƱÍͤˡ¢¥×¥í¥Ñ¥Æ¥£¥ê + ¥¹¥È $PLIST Ãæ¤Ç¥­¡¼¤¬ $KEY ¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ÎÃÍ¡¢Ã¢¤·´Ø¿ô¥Ý¥¤¥ó¥¿¡¢ + ¤òÆÀ¤ë¡£ */ + + /*** @seealso mplist_get () */ M17NFunc mplist_get_func (MPlist *plist, MSymbol key) { - while (1) - { - MPLIST_FIND (plist, key); - if (MPLIST_TAIL_P (plist) || MPLIST_VAL_FUNC_P (plist)) - break; - plist = MPLIST_NEXT (plist); - }; + MPLIST_FIND (plist, key); return (MPLIST_TAIL_P (plist) ? NULL : MPLIST_FUNC (plist)); }