Commit Graph

14 Commits

Author SHA1 Message Date
Wildan M e9f8b0c697 Merge expect files 2026-05-08 17:57:18 +07:00
Jeremy Soller 393489b38b Add wcswidth and test 2022-12-16 17:39:06 -07:00
Mateusz Tabaka 02f202ff83 Use BufWriter (instead of LineWriter) for FILEs other than stdout and stderr
BufWriter has more capacity (8k vs 1k) and doesn't flush the stream after '\n'.
That change helps to reduce the number of syscalls, especially when dealing with text files.

Since BufWriter has a different way of getting number of pending elements than LineWriter -
Pending trait was introduced to deal with that.
2021-01-14 18:45:14 +01:00
Wren Turkal 9a1e9c327a Make byte stream functions set stream orientation.
When a byte-oriented stream function touches a stream, that stream
should be set to byte-oriented mode if it hasn't been set yet. If
it has been set, the opertion should only succeed if the stream is
already in byte-oriented mode.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-07-08 14:33:11 -07:00
Wren Turkal 865b7962a1 Add implmentation for fwide posix function.
This function is used to set the orientation of a stream to either
byte-oriented or wchar-oriented.

More info on this function is here:
https://man7.org/linux/man-pages/man3/fwide.3p.html

This implementation only impmlemnts the manual switching and does
not yet guard against using a byte-oriented stream with wchar
functions and vice versa. Those step will come in additional
commits.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-07-08 14:33:06 -07:00
oddcoder e9615065ac Add tests for both wcsncasecmp and wcscasecmp 2020-04-26 19:13:03 +02:00
Peter Limkilde Svendsen 0b2c3fe5ea Implement wcsstr(), fix return type of wcslen() 2019-11-14 02:46:53 +00:00
jD91mZM2 a8280e8991 Implement wcstol, wcstod, and printf:ing wchars 2019-07-18 12:29:22 +02:00
jD91mZM2 7c99077248 Implement wcstok 2019-07-18 08:15:40 +02:00
emturner 4ed6dca61d implements wcsrchr from wchar.h 2019-02-25 22:53:11 +00:00
emturner ec3488c7b0 implements wcscspn from wchar.h 2019-02-22 23:18:21 +00:00
jD91mZM2 63882684b2 Implement almost all of printf 2018-10-13 14:20:54 +02:00
jD91mZM2 30ec8aa2c9 Add redox to CI 2018-07-02 10:35:40 +02:00
Stephan Vedder cc210361d6 wchar support 2018-07-01 20:59:37 +02:00