minput_lookup(3m17n)

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

✨ minput_lookup ✨

okay bestie, you're in the m17n Library man pages, section 3m17n, and this one is literally called minput_lookup πŸ’– (yes, the NAME section is giving absolutely nothing else β€” it's just the name, and honestly? iconic minimalism πŸŽ€).


🌸 SYNOPSIS 🌸

int minput_lookup (MInputContext * ic, MSymbol key, void * arg, MText * mt)

like... four arguments, one int coming back. we love a tidy signature 🫢


πŸ’… DESCRIPTION πŸ’…

so the whole point of this function is looking up a text that got produced in the input context. minput_lookup() goes and looks up a text inside the input context ic.

here's the tea though β˜• β€” key must be identical to the one that was used in the previous call of minput_filter(). not similar. not "close enough". identical. no cap. so don't be out here freestyling your keys πŸ™ˆ

if a text was actually produced by the input method, it gets concatenated to the M-text mt. so it's an append situation, not an overwrite situation, periodt ✨

and just so you know the lore: this function calls MInputDriver::lookup πŸ‘‘


🌈 RETURN VALUE 🌈

  • If key was correctly handled by the input method, this function returns 0. slay βœ…
  • Otherwise, it returns -1 πŸ’€ β€” and yes, that's true even though some text might be produced in mt. like, it can still hand you text and return -1. both things at once. it's giving chaotic but okay 😭
lowkey important: a -1 doesn't mean mt is empty. check both. iykyk.

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>.


and that's the whole page, bestie πŸ’– this was Version 1.8.4, dated Mon Sep 25 2023, from the minput_lookup(3m17n) page β€” go forth and look up those texts, you absolute main character πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from