Changeset c7c6afd in mainline for kernel/generic/src/printf/vprintf.c


Ignore:
Timestamp:
2025-04-13T23:27:44Z (4 weeks ago)
Author:
GitHub <noreply@…>
Children:
b6061f8c
Parents:
240b2e4 (diff), f5e1692 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Wayne Thornton <wmthornton-dev@…> (2025-04-13 23:27:44)
git-committer:
GitHub <noreply@…> (2025-04-13 23:27:44)
Message:

Merge branch 'HelenOS:master' into master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/printf/vprintf.c

    r240b2e4 rc7c6afd  
    3636#include <console/console.h>
    3737#include <print.h>
    38 #include <printf/printf_core.h>
     38#include <printf_core.h>
    3939#include <putchar.h>
    4040#include <str.h>
     
    4242#include <typedefs.h>
    4343
    44 static int vprintf_str_write(const char *str, size_t size, void *data)
     44static errno_t vprintf_str_write(const char *str, size_t size, void *data)
    4545{
    4646        size_t offset = 0;
    47         size_t chars = 0;
    4847
    49         while (offset < size) {
     48        while (offset < size)
    5049                putuchar(str_decode(str, &offset, size));
    51                 chars++;
    52         }
    5350
    54         return chars;
    55 }
    56 
    57 static int vprintf_wstr_write(const char32_t *str, size_t size, void *data)
    58 {
    59         size_t offset = 0;
    60         size_t chars = 0;
    61 
    62         while (offset < size) {
    63                 putuchar(str[chars]);
    64                 chars++;
    65                 offset += sizeof(char32_t);
    66         }
    67 
    68         return chars;
     51        return EOK;
    6952}
    7053
     
    9275        printf_spec_t ps = {
    9376                vprintf_str_write,
    94                 vprintf_wstr_write,
    9577                NULL
    9678        };
Note: See TracChangeset for help on using the changeset viewer.