X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/21a24f90c5aaaaf13f91716208b32cde163c5918..92cdf874297cbaa96bd0b249e8e069017afb5517:/include/con-utils.h?ds=sidebyside diff --git a/include/con-utils.h b/include/con-utils.h index f03dfb3..a71fdf9 100644 --- a/include/con-utils.h +++ b/include/con-utils.h @@ -1,22 +1,30 @@ -#ifndef CON_UTILS_H +/* + * (C) Copyright 2014 Leo C. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * Console utilities + */ + +#ifndef CON_UTILS_H #define CON_UTILS_H uint_fast8_t tstc(void); -int my_getchar(void); +int my_getchar(uint_fast8_t waitforchar); -/* test if ctrl-c was pressed */ +/* Test if ctrl-c was pressed */ uint_fast8_t ctrlc(void); - -/* pass 1 to disable ctrlc() checking, 0 to enable. - * returns previous state - */ +/* Pass 1 to disable ctrlc() checking, 0 to enable. Returns previous state. */ uint_fast8_t disable_ctrlc(uint_fast8_t disable); uint_fast8_t had_ctrlc (void); void clear_ctrlc(void); -#endif /* CON_UTILS_H */ - +/* Reads user's confirmation. Returns 1 if user's input is "y", "Y", "yes" or "YES" */ +uint_fast8_t confirm_yes(void); +#endif /* CON_UTILS_H */