diff options
| author | Thomas Schmucker <ts@its1.de> | 2020-10-03 11:04:18 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2020-10-03 11:04:18 +0200 |
| commit | 6b9b845dfdd21f8aca771c5b3d151cc1b93de14c (patch) | |
| tree | eceb27feed19f4bbeaa75141518cad523e51ad87 /csv.h | |
| parent | 351994867d84248b7077ca5a0a896f90a46ee1cd (diff) | |
| download | libcsv-error-codes.tar.gz libcsv-error-codes.tar.bz2 libcsv-error-codes.zip | |
erste mögliche Implementierung...error-codes
Diffstat (limited to 'csv.h')
| -rw-r--r-- | csv.h | 12 |
1 files changed, 8 insertions, 4 deletions
| @@ -7,12 +7,16 @@ | |||
| 7 | extern "C" { | 7 | extern "C" { |
| 8 | #endif | 8 | #endif |
| 9 | 9 | ||
| 10 | #ifndef CSV_ERR_START_CODE | ||
| 11 | # define CSV_ERR_START_CODE 0 | ||
| 12 | #endif | ||
| 13 | |||
| 10 | typedef enum { | 14 | typedef 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 | ||
| 18 | typedef struct { | 22 | typedef struct { |
