Changeset 08e103d4 in mainline for uspace/lib/c/generic/loader.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/loader.c

    rd066259 r08e103d4  
    5757{
    5858        return (errno_t) __SYSCALL2(SYS_PROGRAM_SPAWN_LOADER,
    59             (sysarg_t) name, str_size(name));
     59            (sysarg_t) name, str_bytes(name));
    6060}
    6161
     
    125125                str_cpy(cwd, MAX_PATH_LEN + 1, "/");
    126126
    127         size_t len = str_length(cwd);
     127        size_t len = str_code_points(cwd);
    128128
    129129        async_exch_t *exch = async_exchange_begin(ldr->sess);
     
    161161        aid_t req = async_send_0(exch, LOADER_SET_PROGRAM, &answer);
    162162
    163         errno_t rc = async_data_write_start(exch, name, str_size(name) + 1);
     163        errno_t rc = async_data_write_start(exch, name, str_bytes(name) + 1);
    164164        if (rc == EOK) {
    165165                async_exch_t *vfs_exch = vfs_exchange_begin();
     
    226226        size_t buffer_size = 0;
    227227        while (*ap != NULL) {
    228                 buffer_size += str_size(*ap) + 1;
     228                buffer_size += str_bytes(*ap) + 1;
    229229                ap++;
    230230        }
     
    240240        while (*ap != NULL) {
    241241                str_cpy(dp, buffer_size - (dp - arg_buf), *ap);
    242                 dp += str_size(*ap) + 1;
     242                dp += str_bytes(*ap) + 1;
    243243                ap++;
    244244        }
     
    280280        aid_t req = async_send_0(exch, LOADER_ADD_INBOX, NULL);
    281281
    282         errno_t rc = async_data_write_start(exch, name, str_size(name) + 1);
     282        errno_t rc = async_data_write_start(exch, name, str_bytes(name) + 1);
    283283        if (rc == EOK) {
    284284                rc = vfs_pass_handle(vfs_exch, file, exch);
Note: See TracChangeset for help on using the changeset viewer.