From e13725902ed371c1cf24206d1f37692b5d2d3329 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 22 Sep 2005 07:28:49 +0000 Subject: [PATCH] (mplist_conc): New function. --- src/plist.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/plist.c b/src/plist.c index 7439751..22f546e 100644 --- a/src/plist.c +++ b/src/plist.c @@ -1153,6 +1153,34 @@ mplist_pop (MPlist *plist) /*=*/ /***en + @brief Concatenate two plists. + + The mplist_conc () function concatenate plist $TAIL at the end of + plist $PLIST. + + @return If the operation was successful, this function return + $PLIST. Otherwise it returns @c NULL. */ + +MPlist * +mplist_conc (MPlist *plist, MPlist *tail) +{ + MPlist *pl; + + MPLIST_DO (pl, plist); + MPLIST_KEY (pl) = MPLIST_KEY (tail); + MPLIST_VAL (pl) = MPLIST_VAL (tail); + MPLIST_NEXT (pl) = MPLIST_NEXT (tail); + if (! MPLIST_TAIL_P (tail)) + { + tail = MPLIST_NEXT (tail); + M17N_OBJECT_REF (tail); + } + return plist; +} + + +/*=*/ +/***en @brief Find a property of a specific key in a property list. The mplist_find_by_key () function searches property list -- 1.7.10.4