Changeset 08e103d4 in mainline for kernel/generic/src/console/cmd.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
  • kernel/generic/src/console/cmd.c

    rd066259 r08e103d4  
    668668        list_foreach(cmd_list, link, cmd_info_t, hlp) {
    669669                spinlock_lock(&hlp->lock);
    670                 if (str_length(hlp->name) > len)
    671                         len = str_length(hlp->name);
     670                if (str_code_points(hlp->name) > len)
     671                        len = str_code_points(hlp->name);
    672672                spinlock_unlock(&hlp->lock);
    673673        }
     
    919919                spinlock_lock(&hlp->lock);
    920920
    921                 if (str_lcmp(hlp->name, (const char *) argv->buffer, str_length(hlp->name)) == 0) {
     921                if (str_lcmp(hlp->name, (const char *) argv->buffer, str_code_points(hlp->name)) == 0) {
    922922                        printf("%s - %s\n", hlp->name, hlp->description);
    923923                        if (hlp->help)
     
    14861486
    14871487        for (test = tests; test->name != NULL; test++) {
    1488                 if (str_length(test->name) > len)
    1489                         len = str_length(test->name);
     1488                if (str_code_points(test->name) > len)
     1489                        len = str_code_points(test->name);
    14901490        }
    14911491
Note: See TracChangeset for help on using the changeset viewer.