mchar_map_charset(3m17n)
π NAME π
mchar_map_charset β okay bestie so this one is literally just here being mysterious, the original page gives us the name and a lil dash and nothing else, so that's what we're working with π
β¨ SYNOPSIS β¨
int mchar_map_charset (MSymbol charset_name, void(*)(int from, int to,
void *arg) func, void * func_arg)
yeah she's a lil chunky in the signature department, we move π«Ά
πΈ DESCRIPTION πΈ
Okay so here's the vibe: mcharset_map_chars() calls func for all the characters in the charset that goes by charset_name. No cap, all of them. π
But here's the cute part β it does NOT call your function one character at a time like some kind of overachiever. Nope. It hands you a whole chunk of consecutive characters at once. Batch processing era, we love efficiency π β¨
So what does func actually get handed to it? Three lil gifts, babes:
fromandtoβ these two together specify the range of character codes inside the charset πargβ and this one is literally the same thing asfunc_arg, just passed on through, no funny business π
heads up bestie: the function ismchar_map_charsetin the signature but the description keeps sayingmcharset_map_chars(). That's exactly how the original page reads, so we're keeping it 100% as-is, no editing the source material, periodt π«‘
π¦ RETURN VALUE π¦
- If everything went slay?
mcharset_map_chars()returns0β - If it did NOT go slay? It returns
-1and it assigns an error code to the external variablemerror_codeπ
π ERRORS π
MERROR_CHARSETβ that's the one on the list, that's the whole list π
π COPYRIGHT π
Giving credit where credit is due, as we always do π
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>.
So like, yes you can copy it, distribute it, and/or modify it, but only under the terms of the GNU Free Documentation License, and the link for that is right there: http://www.gnu.org/licenses/fdl.html πβ¨
and that's a wrap on the mchar_map_charset page from the m17n Library, manual section 3m17n β this bad boy is Version 1.8.4, dated Mon Sep 25 2023. mwah, go forth and map those charsets bestie, ily π«Άππ
π¦ 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