mconv_getc(3m17n)

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

πŸ’– NAME πŸ’–

okay bestie, say hi to mconv_getc β€” she's a lil function from the m17n Library (that's the manual page mconv_getc(3m17n), iykyk) and she's here to grab you exactly one character through a code converter. yes. one. she's not greedy. πŸ’…


✨ SYNOPSIS ✨

int mconv_getc (MConverter * converter)

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: mconv_getc() reads one character from either the buffer area or the stream that's currently bound to the code converter converter. which one? whichever one is bound to her rn. she doesn't ask questions, she just reads. 🫢

the decoder of converter is the one doing the decoding of the byte sequence β€” that's literally her job, let her cook.

and the internal status of converter? updated appropriately. as it should be. she keeps receipts. πŸ‘‘


🌸 RETURN VALUE 🌸

  • if everything went slay and the operation was successful, mconv_getc() returns the character read in. cute.
  • if the input source hits EOF, she returns EOF without touching the external variable merror_code. no drama, no changes, she just leaves it alone.
  • if an error gets detected, she returns EOF and assigns an error code to merror_code. 😭 so check that variable, bestie.

πŸ’€ ERRORS πŸ’€

  • MERROR_CODING

πŸ‘‘ SEE ALSO πŸ‘‘

the friend group, fr fr:

  • mconv_ungetc()
  • mconv_putc()
  • mconv_gets()

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, periodt. πŸ’œ this was Version 1.8.4, dated Mon Sep 25 2023, and it lives at mconv_getc(3m17n) in the m17n manual. mwah, go read a character bestie πŸ§šβœ¨πŸ’–

πŸ“¦ where this page comes from