summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2020-10-03 11:04:18 +0200
committerThomas Schmucker <ts@its1.de>2020-10-03 11:04:18 +0200
commit6b9b845dfdd21f8aca771c5b3d151cc1b93de14c (patch)
treeeceb27feed19f4bbeaa75141518cad523e51ad87
parent351994867d84248b7077ca5a0a896f90a46ee1cd (diff)
downloadlibcsv-error-codes.tar.gz
libcsv-error-codes.tar.bz2
libcsv-error-codes.zip
erste mögliche Implementierung...error-codes
-rw-r--r--csv.h12
1 files 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 @@
7extern "C" { 7extern "C" {
8#endif 8#endif
9 9
10#ifndef CSV_ERR_START_CODE
11# define CSV_ERR_START_CODE 0
12#endif
13
10typedef enum { 14typedef enum {
11 CSV_ERR_OK = 0, 15 CSV_ERR_OK = 0,
12 CSV_ERR_OUT_OF_MEMORY = -1, 16 CSV_ERR_OUT_OF_MEMORY = -(CSV_ERR_START_CODE + 1),
13 CSV_ERR_OUT_OF_RANGE = -2, 17 CSV_ERR_OUT_OF_RANGE = -(CSV_ERR_START_CODE + 2),
14 CSV_ERR_IO_READ = -3, 18 CSV_ERR_IO_READ = -(CSV_ERR_START_CODE + 3),
15 CSV_ERR_IO_WRITE = -4 19 CSV_ERR_IO_WRITE = -(CSV_ERR_START_CODE + 4)
16} csv_err_t; 20} csv_err_t;
17 21
18typedef struct { 22typedef struct {