mconv_ungetc(3m17n)
π mconv_ungetc β the m17n Library, bestie edition π
okay so welcome to the m17n Library corner of the man pages, section 3m17n, and today's main character is mconv_ungetc. no cap, she's a little icon. π
β¨ NAME β¨
mconv_ungetc β and yeah, the official description slot is literally just a dash. empty. void. a mystery. the manpage said "mconv_ungetc -" and nothing else, so we're all just living with that. iykyk. π«Ά
πΈ SYNOPSIS πΈ
int mconv_ungetc (MConverter * converter, int c)
look at her. two args. returns an int. clean. π
π¦ DESCRIPTION π¦
so the whole vibe here is: push a character back into a code converter. that's it, that's the function.
mconv_ungetc() pushes the character c back into the code converter converter. and like β not just one, bestie. any number of characters can be pushed back. go off, stack them, the limit does not exist. π₯
the order is the spicy part: the lastly pushed back character is the firstly read one by the subsequent mconv_getc() call. so it's giving very much a stack situation, last in first out, no notes. β¨
and here's the thing you need to know: the characters pushed back are registered only in converter. they are not written to the input source. so don't be out here thinking you're editing your actual file or stream β you're not. it's all happening inside the converter's own little world. π§
lastly, the internal status of converter is updated appropriately. she keeps herself tidy. queen behavior. π
π RETURN VALUE π
- if the operation was a slay (successful) β
mconv_ungetc()returnsc. the character comes right back to you. π«Ά - if not β it returns
EOFand assigns an error code to the external variablemerror_code.
so like, checkmerror_codeif you get anEOF, fr fr. don't just assume. π
π ERRORS π
the possible error codes are:
MERROR_CODINGMERROR_CHAR
that's the list. exactly two. periodt. π
π SEE ALSO π
mconv_getc()mconv_putc()mconv_gets()
the whole squad. go read them too, they're all iconic in their own way. π
π 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>.
and that's the page!! Version 1.8.4, dated Mon Sep 25 2023 β yeah she's been around a minute but she still ate. π β¨ mwah, go push some characters back, bestie. ππ¦πΈ
π¦ 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