3 ms·
This is the first time I saw "keyword arguments" in fopen's mode argument. I'm not a fan. https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-fopen-open-file
by planede 4y ago
This is the first time I saw "keyword arguments" in fopen's mode argument. I'm not a fan.
https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-fopen-open-file https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-fopen-...
- mananaysiempre 4y agoGlibc 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]