mchar_put_prop(3m17n)
β¨ mchar_put_prop β the m17n Library's little "here, take this value" bestie β¨
okay so you found a page from the m17n Library manual (that's mchar_put_prop(3m17n), hi hiii π«Ά) and honestly? it's giving "short but powerful". let's get into it.
πΈ NAME πΈ
mchar_put_prop β sets a character property's value, that's literally the whole job π
π SYNOPSIS π
int mchar_put_prop (int c, MSymbol key, void * val)
three args, one int back, no drama. iconic behavior fr fr β¨
π¦ DESCRIPTION π¦
so basically: set the value of a character property. that's the vibe.
the mchar_put_prop() function goes looking through character c for the character property whose key is key, and once it finds that property, it assigns val to the value of the found property. boom. done. main character energy π
think of it like: character c walks in, you hand it a key (key) and a lil gift (val), and it goes "oh that's my property" and drops the gift right in there. adorable. correct. no notes π
β RETURN VALUE β
- if the operation was successful,
mchar_put_prop()returns0π - otherwise, it returns
-1π
like, that's it. zero means yay, negative one means nope. no in-between. binary queen.
π ERRORS π
the error symbols you might bump into:
MERROR_SYMBOLMERROR_DB
if one of these pops up, that's the universe telling you something went sideways. respect the error codes, bestie π
π₯ SEE ALSO π₯
go read these next, they're the friend group:
mchar_define_property()mchar_get_prop()
π COPYRIGHT π
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.
okay that's the whole page, you're officially educated π§π this was Version 1.8.4, dated Mon Sep 25 2023, from the m17n Library, and yes bestie the copyright + GNU FDL notice is real and you should absolutely keep it if you're copying this doc around. slay, stay hydrated, go set some character properties π β¨π
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms