Changeset 1113c9e in mainline for uspace/app/sbi/src/os/helenos.c
- Timestamp:
- 2010-06-09T19:03:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8eec3c8
- Parents:
- 8f80c77 (diff), c5cb943d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sbi/src/os/helenos.c
r8f80c77 r1113c9e 173 173 } 174 174 175 /** Convert character to new string. 176 * 177 * @param chr Character 178 * @return Newly allocated string. 179 */ 180 char *os_chr_to_astr(wchar_t chr) 181 { 182 char *str; 183 size_t offset; 184 185 str = malloc(STR_BOUNDS(1) + 1); 186 if (str == NULL) { 187 printf("Memory allocation error.\n"); 188 exit(1); 189 } 190 191 offset = 0; 192 if (chr_encode(chr, str, &offset, STR_BOUNDS(1)) != EOK) { 193 /* XXX Should handle gracefully */ 194 printf("String conversion error.\n"); 195 exit(1); 196 } 197 198 str[offset] = '\0'; 199 return str; 200 } 201 175 202 /** Display survival help message. */ 176 203 void os_input_disp_help(void)
Note:
See TracChangeset
for help on using the changeset viewer.