From 6b9b845dfdd21f8aca771c5b3d151cc1b93de14c Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Sat, 3 Oct 2020 11:04:18 +0200 Subject: erste mögliche Implementierung... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- csv.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/csv.h b/csv.h index 9ac7c05..beb82ff 100644 --- a/csv.h +++ b/csv.h @@ -7,12 +7,16 @@ extern "C" { #endif +#ifndef CSV_ERR_START_CODE +# define CSV_ERR_START_CODE 0 +#endif + typedef enum { CSV_ERR_OK = 0, - CSV_ERR_OUT_OF_MEMORY = -1, - CSV_ERR_OUT_OF_RANGE = -2, - CSV_ERR_IO_READ = -3, - CSV_ERR_IO_WRITE = -4 + CSV_ERR_OUT_OF_MEMORY = -(CSV_ERR_START_CODE + 1), + CSV_ERR_OUT_OF_RANGE = -(CSV_ERR_START_CODE + 2), + CSV_ERR_IO_READ = -(CSV_ERR_START_CODE + 3), + CSV_ERR_IO_WRITE = -(CSV_ERR_START_CODE + 4) } csv_err_t; typedef struct { -- cgit v1.3