Changeset 28a5ebd in mainline for uspace/lib/bithenge
- Timestamp:
- 2020-06-18T15:39:50Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce52c333
- Parents:
- 4f663f3e
- Location:
- uspace/lib/bithenge/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/bithenge/src/helenos/common.h
r4f663f3e r28a5ebd 47 47 const char *string; 48 48 size_t offset; 49 wchar_t ch;49 char32_t ch; 50 50 } string_iterator_t; 51 51 … … 64 64 } 65 65 66 static inline errno_t string_iterator_next(string_iterator_t *i, wchar_t *out)66 static inline errno_t string_iterator_next(string_iterator_t *i, char32_t *out) 67 67 { 68 68 *out = i->ch; -
uspace/lib/bithenge/src/linux/common.h
r4f663f3e r28a5ebd 37 37 #include <stdlib.h> 38 38 #include <string.h> 39 #include < wchar.h>39 #include <uchar.h> 40 40 41 41 #define max(aleph, bet) ((aleph) > (bet) ? (aleph) : (bet)) … … 55 55 } 56 56 57 static inline errno_t string_iterator_next(string_iterator_t *i, wchar_t *out)57 static inline errno_t string_iterator_next(string_iterator_t *i, char32_t *out) 58 58 { 59 59 wint_t rc = btowc(*(*i)++); // TODO 60 *out = ( wchar_t) rc;60 *out = (char32_t) rc; 61 61 return rc == WEOF ? EILSEQ : EOK; 62 62 } … … 72 72 } 73 73 74 static inline const char *str_chr(const char *string, wchar_t ch)74 static inline const char *str_chr(const char *string, char32_t ch) 75 75 { 76 76 return strchr(string, wctob(ch)); // TODO -
uspace/lib/bithenge/src/print.c
r4f663f3e r28a5ebd 40 40 #include <stdarg.h> 41 41 #include <stdio.h> 42 #include < wchar.h>42 #include <uchar.h> 43 43 #include <bithenge/blob.h> 44 44 #include <bithenge/print.h> … … 164 164 string_iterator_t i = string_iterator(value); 165 165 while (!string_iterator_done(&i)) { 166 wchar_t ch;166 char32_t ch; 167 167 errno_t rc = string_iterator_next(&i, &ch); 168 168 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.