hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit a37d9484a3dc7fcd7fa6399da0930820963dd3a5
parent 5a24cf7cfac0882727ec0f14c114a5274b6fd22a
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 30 Mar 2022 10:45:56 +0200

unix::tty: add strerror

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Munix/tty/types.ha | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/unix/tty/types.ha b/unix/tty/types.ha @@ -7,6 +7,11 @@ use errors; // Any error that may occur during TTY-related tasks. export type error = !(errors::invalid | errors::unsupported | errors::noentry); +// Converts an [[error]] to a human-friendly string. +export fn strerror(err: error) str = { + return errors::strerror(err); +}; + // Structure representing dimensions of a terminal. export type ttysize = struct { rows: u16,