common: add generic input-line interface, and an implementation of it for text files

This commit is contained in:
2024-11-13 21:36:37 +00:00
parent bf2c9c1d90
commit cbd8639605
6 changed files with 96 additions and 11 deletions

View File

@@ -0,0 +1,15 @@
#ifndef IVY_COMMON_STATUS_H_
#define IVY_COMMON_STATUS_H_
enum ivy_status {
IVY_OK = 0,
IVY_ERR_EOF = -1,
IVY_ERR_IO_FAILURE = -2,
IVY_ERR_BAD_SYNTAX = -3,
IVY_ERR_NO_MEMORY = -4,
IVY_ERR_NOT_SUPPORTED = -5,
};
extern const char *ivy_status_to_string(enum ivy_status status);
#endif