Commit Graph

69 Commits

Author SHA1 Message Date
Nicolás Antinori 89f53e7640 Using Reader (formerly LookAheadReader) in scanf/wscanf format string 2026-04-14 14:11:57 -06:00
auronandace b4009544a8 minor code cleanups 2026-04-03 14:39:56 +01:00
Connor-GH e721d3d7c8 fgetws: don't always return NULL on EOF
This was a bug that prevented a lot of tests from passing. We only
need to return NULL if the file had an error. `fgetws` "stops when end
of stream is reached". Also, it only returns an error if "end of stream
was *already* reached or if an error occurred" (emphasis mine). Compare
this to the musl implementation:
https://git.musl-libc.org/cgit/musl/tree/src/stdio/fgetws.c
2026-03-29 21:10:59 -05:00
auronandace 84c9038a11 move wcstoimax and wcstoumax from wchar to inttypes 2026-03-17 16:53:48 +00:00
auronandace 70f9dad334 move macros from wchar to macros 2026-03-17 16:46:09 +00:00
auronandace c4d667c6bf make some cast lossless in macro in wchar 2026-03-11 11:02:53 +00:00
auronandace 4b9a15ce7d getopt and wchar cleanup 2026-02-28 15:50:10 +00:00
auronandace e1e9753c65 add upper_case_acronyms clippy lint and minor cleanups 2026-02-25 13:55:01 +00:00
auronandace c8a1bff78a wchar cleanup 2026-02-20 09:51:15 +00:00
Wildan M 1acf1d83cc Temporarily enable wcsftime and wcsxfrm 2026-01-27 15:27:45 +07:00
Wildan M f15322453b Convert all println to log or todo 2026-01-25 05:27:38 +07:00
sourceturner defd2ce7c3 Deny deny-unsafe_op_in_unsafe_fn on the crate level 2026-01-21 00:41:57 +01:00
sourceturner 718dc53b87 Use unsafe blocks in wchar.h implementation 2026-01-18 21:25:10 +01:00
Jeremy Soller 1bbdcc1202 Implement fwscanf and similar 2025-12-19 12:12:16 -07:00
auronandace e913e2447b fix fmt 2025-12-16 11:20:37 +00:00
auronandace 59295af7d8 mark 2 functions as unsafe 2025-12-16 11:14:02 +00:00
auronandace e041d5b552 only import needed types 2025-12-16 11:10:55 +00:00
auronandace 973b96a727 update and add spec links 2025-12-16 10:59:38 +00:00
4lDO2 62cc63c351 WIP: Reimpl WPrintfIter also in safe code. 2025-10-06 16:16:48 +02:00
Jeremy Soller 82084440ad Support nightly-2025-10-03 2025-10-03 21:51:10 -06:00
Nicolás Antinori 28b471300b added vwscanf 2025-02-09 02:29:20 -03:00
Nicolás Antinori da3e1e94fa added get_char_encoded_length function 2025-02-08 14:05:37 -03:00
Nicolás Antinori 61c31f348c changed wscanf parameters 2025-02-06 19:58:54 -03:00
Nicolás Antinori 18659e821f compiling but not working :) 2025-02-06 19:45:54 -03:00
Jeremy Soller 90f30c5f51 Make NulTerminated::new return option 2025-01-09 13:33:56 -07:00
Peter Limkilde Svendsen 41264dc8b1 Add NulTerminatedInclusive iterator, rewrite/fix strchr/wcschr 2024-10-22 22:12:24 +00:00
Peter Limkilde Svendsen 0a23acd401 Implement iterators on pointers 2024-09-22 23:42:28 +00:00
Nicolás Antinori 198c5502b7 swscanf and vswscanf implementation proposal 2024-08-01 18:41:14 +00:00
Peter Limkilde Svendsen a7137512fa Use standard casing and mangling for internal errno 2024-03-01 00:25:42 +00:00
Peter Limkilde Svendsen 9093f6bc47 Use Cell representation for errno 2024-02-29 14:07:40 +00:00
4lDO2 5630b6e0df Make relibc (except libm) pure Rust 2024-01-11 13:08:06 +00:00
4lDO2 ae46e37ca7 Run rustfmt 2023-10-26 15:51:04 +02:00
Darley Barreto f7d151e287 Simplify wcsrtombs and make test follow standard 2023-10-25 09:13:41 -03:00
Jeremy Soller 76242fc7bc Merge branch 'fix/ungetwc' into 'master'
Fix ungetwc for multi byte chars

See merge request redox-os/relibc!425
2023-10-19 14:58:57 +00:00
Darley Barreto 3d2dd71b8b Fix ungetwc for multi byte chars 2023-10-19 14:58:57 +00:00
Darley Barreto 05992b8451 Add wcpcpy, wcpncpy, wcsdup, wcsnlen, wcsnrtombs 2023-10-19 14:58:37 +00:00
Darley Barreto db9bbaeb48 Make fgetwc real multibyte 2023-10-14 00:29:42 +00:00
Jeremy Soller 63b7b76ab3 Format 2023-05-22 10:01:18 -06:00
Darley Barreto 9642d2ab02 Adding some wcst* functions 2023-05-22 16:01:04 +00:00
4lDO2 cdd0f67b23 Rustfmt. 2023-05-17 15:28:10 +02:00
Jeremy Soller 29c898dff0 Cargo format 2023-05-11 07:48:51 -06:00
Jeremy Soller e1ecdbd8a5 Implement vfwprintf 2023-05-11 07:48:49 -06:00
Jeremy Soller 5a5bd0c983 Add stubs for wprintf functions 2023-05-11 07:48:21 -06:00
Darley Barreto 82eb083091 Fixing wcsrtombs 2023-05-10 12:48:33 +00:00
Darley Barreto c659bf11f9 Implementing ungetwc 2023-05-09 14:23:25 +00:00
Darley Barreto 7155005be2 Adding wcsrtombs. 2023-05-08 12:39:53 +00:00
Jeremy Soller 393489b38b Add wcswidth and test 2022-12-16 17:39:06 -07:00
Jeremy Soller f65c1c27c7 Implement wcwidth 2022-11-10 10:12:41 -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 eac69c920d Implement wcscasecmp and wcsncasecmp
This patch implements wcscasecmp and wcsncasecmp. These two
function are required for binutils to link against relibc.
2020-04-26 19:13:03 +02:00