Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/fmtutil/fmtutil.c

    r1d6dd2a r38d150e  
    3131#include <fmtutil.h>
    3232#include <stdlib.h>
    33 #include <str.h>
    3433
    3534typedef struct {
     
    3938} printmode_t;
    4039
    41 errno_t print_wrapped_console(const char *str, align_mode_t alignment)
     40int print_wrapped_console(const char *str, align_mode_t alignment)
    4241{
    4342        console_ctrl_t *console = console_init(stdin, stdout);
     
    4746        }
    4847        sysarg_t con_rows, con_cols, con_col, con_row;
    49         errno_t rc = console_get_size(console, &con_cols, &con_rows);
     48        int rc = console_get_size(console, &con_cols, &con_rows);
    5049        if (rc != EOK) {
    5150                return rc;
     
    6463 *
    6564 **/
    66 static errno_t print_line(wchar_t *wstr, size_t chars, bool last, void *data)
     65static int print_line(wchar_t *wstr, size_t chars, bool last, void *data)
    6766{
    6867        printmode_t *pm = (printmode_t *) data;
    6968        wchar_t old_char = wstr[chars];
    7069        wstr[chars] = 0;
    71         errno_t rc = print_aligned_w(wstr, pm->width, last, pm->alignment);
     70        int rc = print_aligned_w(wstr, pm->width, last, pm->alignment);
    7271        wstr[chars] = old_char;
    7372        return rc;
    7473}
    7574
    76 errno_t print_wrapped(const char *str, size_t width, align_mode_t mode)
     75int print_wrapped(const char *str, size_t width, align_mode_t mode)
    7776{
    7877        printmode_t pm;
     
    8483                return ENOMEM;
    8584        }
    86         errno_t rc = wrap(wstr, width, print_line, &pm);
     85        int rc = wrap(wstr, width, print_line, &pm);
    8786        free(wstr);
    8887        return rc;
    8988}
    9089
    91 errno_t print_aligned_w(const wchar_t *wstr, size_t width, bool last,
     90int print_aligned_w(const wchar_t *wstr, size_t width, bool last,
    9291    align_mode_t mode)
    9392{
     
    170169        return EOK;
    171170}
    172 errno_t print_aligned(const char *str, size_t width, bool last, align_mode_t mode)
     171int print_aligned(const char *str, size_t width, bool last, align_mode_t mode)
    173172{
    174173        wchar_t *wstr = str_to_awstr(str);
     
    176175                return ENOMEM;
    177176        }
    178         errno_t rc = print_aligned_w(wstr, width, last, mode);
     177        int rc = print_aligned_w(wstr, width, last, mode);
    179178        free(wstr);
    180179        return rc;
    181180}
    182181
    183 errno_t wrap(wchar_t *wstr, size_t width, line_consumer_fn consumer, void *data)
     182int wrap(wchar_t *wstr, size_t width, line_consumer_fn consumer, void *data)
    184183{
    185184        size_t word_start = 0;
Note: See TracChangeset for help on using the changeset viewer.