.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA) .\" Copyright (C) 2001-2011 .\" National Institute of Advanced Industrial Science and Technology (AIST) .\" This file is part of the m17n library documentation. .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.2 or .\" any later version published by the Free Software Foundation; with no .\" Invariant Section, no Front-Cover Texts, .\" and no Back-Cover Texts. A copy of the license is included in the .\" appendix entitled "GNU Free Documentation License". .TH "mplist_put" 3m17n "Mon Sep 25 2023" "Version 1.8.4" "The m17n Library" \" -*- nroff -*- .ad l .nh .SH NAME mplist_put \- .SH SYNOPSIS \fBMPlist\fP* \fBmplist_put\fP (\fBMPlist\fP * \fIplist\fP, MSymbol \fIkey\fP, void * \fIval\fP) .SH DESCRIPTION .PP Set the value of a property in a property list\&. The .ft B mplist_put() .ft R function searches property list .ft B plist .ft R from the beginning for a property whose key is .ft B key\fP\&. If such a property is found, its value is changed to .ft B value\fP\&. Otherwise, a new property whose key is .ft B key .ft R and value is .ft B value .ft R is appended at the end of .ft B plist\fP\&. See the documentation of .ft B mplist_add() .ft R for the restriction on .ft B key .ft R and .ft B val\fP\&. .PP If .ft B key .ft R is a managing key, .ft B val .ft R must be a managed object\&. In this case, the reference count of the old value, if not .ft C NULL\fP, .ft R is decremented by one, and that of .ft B val .ft R is incremented by one\&. .PP .SH RETURN VALUE .PP .RS 4 If the operation was successful, .ft B mplist_put() .ft R returns a sublist of .ft B plist .ft R whose first element is the just modified or added one\&. Otherwise, it returns .ft C NULL\fP\&. .br .RE .PP .SH COPYRIGHT Copyright (C) 2001 Information\-technology Promotion Agency (IPA) .br Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST) .br Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License .