]>
Commit | Line | Data |
---|---|---|
35edb766 L |
1 | /* |
2 | * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de> | |
3 | * | |
4 | * SPDX-License-Identifier: GPL-2.0+ | |
5 | */ | |
6 | ||
7 | /* | |
8 | * Console utilities | |
9 | */ | |
10 | ||
11 | #ifndef CON_UTILS_H | |
d684c216 L |
12 | #define CON_UTILS_H |
13 | ||
14 | uint_fast8_t tstc(void); | |
15 | ||
424b184a | 16 | int my_getchar(uint_fast8_t waitforchar); |
d684c216 | 17 | |
1cdd02d8 | 18 | /* Test if ctrl-c was pressed */ |
d684c216 L |
19 | uint_fast8_t ctrlc(void); |
20 | ||
1cdd02d8 | 21 | /* Pass 1 to disable ctrlc() checking, 0 to enable. Returns previous state. */ |
d684c216 L |
22 | uint_fast8_t disable_ctrlc(uint_fast8_t disable); |
23 | ||
24 | uint_fast8_t had_ctrlc (void); | |
25 | void clear_ctrlc(void); | |
26 | ||
1cdd02d8 L |
27 | /* Reads user's confirmation. Returns 1 if user's input is "y", "Y", "yes" or "YES" */ |
28 | uint_fast8_t confirm_yes(void); | |
29 | ||
d684c216 | 30 | #endif /* CON_UTILS_H */ |