Changeset 28a5ebd in mainline for uspace/dist/src/c/demos/edit/search.c
- Timestamp:
- 2020-06-18T15:39:50Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce52c333
- Parents:
- 4f663f3e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/dist/src/c/demos/edit/search.c
r4f663f3e r28a5ebd 49 49 return NULL; 50 50 51 wchar_t *p = str_to_awstr(pattern);51 char32_t *p = str_to_awstr(pattern); 52 52 if (p == NULL) { 53 53 free(search); … … 62 62 half = search->pattern_length / 2; 63 63 for (pos = 0; pos < half; pos++) { 64 wchar_t tmp = p[pos];64 char32_t tmp = p[pos]; 65 65 p[pos] = p[search->pattern_length - pos - 1]; 66 66 p[search->pattern_length - pos - 1] = tmp; … … 106 106 search_equals_fn eq = s->ops.equals; 107 107 108 wchar_t cur_char;108 char32_t cur_char; 109 109 errno_t rc = EOK; 110 110 while ((rc = s->ops.producer(s->client_data, &cur_char)) == EOK && cur_char > 0) { … … 140 140 } 141 141 142 bool char_exact_equals(const wchar_t a, const wchar_t b)142 bool char_exact_equals(const char32_t a, const char32_t b) 143 143 { 144 144 return a == b;
Note:
See TracChangeset
for help on using the changeset viewer.