Changeset b06414f in mainline for uspace/lib/c/include/str.h


Ignore:
Timestamp:
2017-05-19T14:04:36Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e540bc87
Parents:
2628642
Message:

Use proper sizes for buffers holding conversions from/to UTF-16 LFN's

FAT uses UTF-16 for encoding long file names. HelenOS needs to convert
these strings into and from its native UTF-8 encoding. The size of the
UTF-8 buffer in bytes needs to be at least 4 times the number of
characters in a LFN.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/str.h

    r2628642 rb06414f  
    9898extern wchar_t *str_to_awstr(const char *src);
    9999extern int utf16_to_str(char *dest, size_t size, const uint16_t *src);
    100 extern int str_to_utf16(uint16_t *dest, size_t size, const char *src);
     100extern int str_to_utf16(uint16_t *dest, size_t dlen, const char *src);
    101101
    102102extern char *str_chr(const char *str, wchar_t ch);
Note: See TracChangeset for help on using the changeset viewer.