mconv_gets(3m17n)
π mconv_gets β the m17n library's little line-reader β¨
okay bestie, welcome to mconv_gets(3m17n), a page from the m17n Library manual. it's giving "quietly iconic utility function" and honestly? we're obsessed. π
πΈ NAME πΈ
mconv_gets β no cap, that's the whole name, the description lives below π¦
β¨ SYNOPSIS β¨
MText* mconv_gets (MConverter * converter, MText * mt)
π DESCRIPTION π
so. you want to read a whole line but you're working through a code converter? say less. π«Ά
The mconv_gets() function reads one line from the buffer area or the stream that is currently bound to the code converter converter. (whichever one it's vibing with at the moment β that's the one it reads from. π)
The decoder of converter is what does the decoding. the decoded character sequence gets appended at the end of the M-text mt β not replacing it, bestie, appending, there's a difference and it matters. π
heads up: the final newline character in the original byte sequence is not appended. it gets left behind. newline said "not my problem" and honestly, respect. π
and the internal status of converter gets updated appropriately, so it stays in sync like the main character it is. π
π RETURN VALUE π
- operation successful β
mconv_gets()returns the modifiedmt. slay. β¨ - hits EOF without reading a single character β it returns
mtand does not change it. no harm, no foul, just an empty little moment. π₯² - an error gets detected β it returns
NULLand assigns an error code tomerror_code. dramatic, but fair. π
π¨ ERRORS π¨
MERROR_CODING
π SEE ALSO π
mconv_getc()mconv_ungetc()mconv_putc()
the whole squad, fr fr. go read them next. π
π 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 whole page, bestie!! πβ¨ this little gem is from Version 1.8.4, dated Mon Sep 25 2023 β yes it's got history, yes it's still serving, we love a legacy icon. ππ¦ take care of your converters and they'll take care of you. mwah. π π
π¦ 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