Changeset 08e103d4 in mainline for uspace/lib/c/generic/io/asprintf.c


Ignore:
Timestamp:
2019-02-05T18:26:05Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
1d2f85e
Parents:
d066259
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 16:16:55)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 18:26:05)
Message:

Use clearer naming for string length functions

This and the following commit change the names of functions, as well as
their documentation, to use unambiguous terms "bytes" and "code points"
instead of ambiguous terms "size", "length", and "characters".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/asprintf.c

    rd066259 r08e103d4  
    4343static int asprintf_str_write(const char *str, size_t count, void *unused)
    4444{
    45         return str_nlength(str, count);
     45        return str_ncode_points(str, count);
    4646}
    4747
    4848static int asprintf_wstr_write(const wchar_t *str, size_t count, void *unused)
    4949{
    50         return wstr_nlength(str, count);
     50        return wstr_ncode_points(str, count);
    5151}
    5252
    53 int vprintf_length(const char *fmt, va_list args)
     53int vprintf_code_points(const char *fmt, va_list args)
    5454{
    5555        printf_spec_t ps = {
     
    6262}
    6363
    64 int printf_length(const char *fmt, ...)
     64int printf_code_points(const char *fmt, ...)
    6565{
    6666        va_list args;
    6767        va_start(args, fmt);
    68         int ret = vprintf_length(fmt, args);
     68        int ret = vprintf_code_points(fmt, args);
    6969        va_end(args);
    7070
Note: See TracChangeset for help on using the changeset viewer.