mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 20:05:54 +00:00
base: helper for printing individual characters
This commit is contained in:
parent
9b3ae0ed2d
commit
9c2f229246
@ -167,6 +167,21 @@ namespace Genode {
|
||||
*/
|
||||
void print(Output &output, Hex const &);
|
||||
|
||||
/**
|
||||
* Helper for the output of an individual character
|
||||
*
|
||||
* When printing a 'char' value, it appears as an integral number. By
|
||||
* wrapping the value in a 'Char' object, it appears as character instead.
|
||||
*/
|
||||
struct Char
|
||||
{
|
||||
char const c;
|
||||
|
||||
explicit Char(char c) : c(c) { }
|
||||
|
||||
void print(Output &output) const { output.out_char(c); }
|
||||
};
|
||||
|
||||
/**
|
||||
* Print information about object 'obj'
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user