4 ms·
Glibc uses those as well[1], ccs=ENCODING opens a file in ENCODING for use with wchar_t functions (“CCS” for “coded character set” being prehistoric standardese
by mananaysiempre 4y ago
Glibc uses those as well[1], ccs=ENCODING opens a file in ENCODING for use with wchar_t functions (“CCS” for “coded character set” being prehistoric standardese for what I colloquially called an encoding here).
I’m not a fan, either, FWIW, but those are the most frequent answer I’ve seen as to why fopen() accepts a string and not a set of flags like open(). Might be a post hoc rationalization, though,—I’m willing to believe it was originally just a hack for conciseness, for example.
[1] https://www.gnu.org/software/libc/manual/html_node/Opening-Streams.html https://www.gnu.org/software/libc/manual/html_node/Opening-S...
- deleted 4y ago[deleted]