From 265053e2a4394b20d82aa1170ec3a9901f437d81 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Wed, 2 Sep 2015 10:57:48 +0200 Subject: Adds some comments, as well as minor code improvements. --- src/input.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/input.h') diff --git a/src/input.h b/src/input.h index 03b5c5a..4a23c27 100644 --- a/src/input.h +++ b/src/input.h @@ -9,6 +9,14 @@ struct relabsd_input int fd; }; +/* + * Returns -1 on (fatal) error, + * 0 on success. + * + * 'input' does not need to be initialized, as the function will to that for + * you (on success). + * On success, 'input' will need to be closed. + */ int relabsd_input_open ( struct relabsd_input * const input, @@ -17,6 +25,14 @@ int relabsd_input_open void relabsd_input_close (const struct relabsd_input * const input); +/* + * Returns -1 on (warning) error, + * 0 on successful read. + * + * The 'input_*' parameters do not need to be initialized, as the function will + * do that for you (on success). + * Requires 'input' to be open. + */ int relabsd_input_read ( const struct relabsd_input * const input, -- cgit v1.2.3-70-g09d2