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
  • kernel/generic/src/sysinfo/sysinfo.c

    rd066259 r08e103d4  
    530530                if (spaces == 0) {
    531531                        printf("%s", cur->name);
    532                         length = str_length(cur->name);
     532                        length = str_code_points(cur->name);
    533533                } else {
    534534                        sysinfo_indent(spaces);
    535535                        printf(".%s", cur->name);
    536                         length = str_length(cur->name) + 1;
     536                        length = str_code_points(cur->name) + 1;
    537537                }
    538538
     
    747747                size_t size = 0;
    748748                for (sysinfo_item_t *cur = subtree; cur; cur = cur->next)
    749                         size += str_size(cur->name) + 1;
     749                        size += str_bytes(cur->name) + 1;
    750750
    751751                if (dry_run) {
     
    762762                        for (sysinfo_item_t *cur = subtree; cur; cur = cur->next) {
    763763                                str_cpy(names + pos, size - pos, cur->name);
    764                                 pos += str_size(cur->name) + 1;
     764                                pos += str_bytes(cur->name) + 1;
    765765                        }
    766766
Note: See TracChangeset for help on using the changeset viewer.