Changeset 46577995 in mainline for uspace/lib/fmtutil/fmtutil.h


Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

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

    rfacacc71 r46577995  
    4444 * @returns EOK on success or an error code on failure
    4545 */
    46 typedef int (*line_consumer_fn)(wchar_t *, size_t, bool, void *);
     46typedef errno_t (*line_consumer_fn)(wchar_t *, size_t, bool, void *);
    4747
    48 extern int print_aligned_w(const wchar_t *, size_t, bool, align_mode_t);
    49 extern int print_aligned(const char *, size_t, bool, align_mode_t);
    50 extern int print_wrapped(const char *, size_t, align_mode_t);
    51 extern int print_wrapped_console(const char *, align_mode_t);
     48extern errno_t print_aligned_w(const wchar_t *, size_t, bool, align_mode_t);
     49extern errno_t print_aligned(const char *, size_t, bool, align_mode_t);
     50extern errno_t print_wrapped(const char *, size_t, align_mode_t);
     51extern errno_t print_wrapped_console(const char *, align_mode_t);
    5252
    5353/** Wrap characters in a wide string to the given length.
     
    5858 * @param data user data to pass to the consumer function
    5959 */
    60 extern int wrap(wchar_t *, size_t, line_consumer_fn, void *);
     60extern errno_t wrap(wchar_t *, size_t, line_consumer_fn, void *);
Note: See TracChangeset for help on using the changeset viewer.