File tree Expand file tree Collapse file tree 5 files changed +60
-0
lines changed Expand file tree Collapse file tree 5 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ add_header_library(
2+ mbstate
3+ HDRS
4+ mbstate.h
5+ DEPENDS
6+ libc.hdr.types.wchar_t
7+ )
8+
9+ add_header_library(
10+ character_converter
11+ HDRS
12+ character_converter.h
13+ DEPENDS
14+ libc.hdr.types.wchar_t
15+ .mbstate
16+ .utf_ret
17+ )
18+
19+ add_header_library(
20+ utf_ret
21+ HDRS
22+ utf_ret.h
23+ DEPENDS
24+ )
Original file line number Diff line number Diff line change 1+
2+
Original file line number Diff line number Diff line change 1+
2+ #include " src/__support/wchar/mbstate.h"
3+ #include " src/__support/wchar/utf_ret.h"
4+ #include " hdr/types/wchar_t.h"
5+
6+ class CharacterConverter {
7+ private:
8+ mbstate_t * state;
9+
10+ public:
11+ CharacterConverter ();
12+
13+ bool isComplete ();
14+
15+ int push (char utf8_byte);
16+ int push (wchar_t utf32);
17+
18+ utf_ret<char > pop_utf8 ();
19+ utf_ret<wchar_t > pop_utf32 ();
20+ };
Original file line number Diff line number Diff line change 1+
2+ #include "hdr/types/wchar_t.h"
3+
4+ struct mbstate_t {
5+ wchar_t partial ;
6+ unsigned char bits_processed ;
7+ unsigned char total_bytes ;
8+ };
Original file line number Diff line number Diff line change 1+
2+ template <typename T>
3+ struct utf_ret {
4+ T out;
5+ int error;
6+ };
You can’t perform that action at this time.
0 commit comments