mchar_map_charset(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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:

  • from and to β€” these two together specify the range of character codes inside the charset πŸ“
  • arg β€” and this one is literally the same thing as func_arg, just passed on through, no funny business πŸŽ€
heads up bestie: the function is mchar_map_charset in the signature but the description keeps saying mcharset_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() returns 0 βœ…
  • If it did NOT go slay? It returns -1 and it assigns an error code to the external variable merror_code 😭

πŸ’€ ERRORS πŸ’€

  • MERROR_CHARSET β€” that's the one on the list, that's the whole list πŸ“

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