From db6807fd6644b1e129008ff9622384cef4e48654 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Sun, 5 Jul 2020 11:54:28 +0200 Subject: Formatiere den Quellcode mit clang-format --- csv.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'csv.h') diff --git a/csv.h b/csv.h index 5ee7695..8abeb18 100644 --- a/csv.h +++ b/csv.h @@ -1,14 +1,14 @@ #pragma once -#include /* FILE */ -#include /* size_t */ +#include /* size_t */ +#include /* FILE */ #ifdef __cplusplus extern "C" { #endif typedef enum { - CSV_ERR_OK = 0, + CSV_ERR_OK = 0, CSV_ERR_OUT_OF_MEMORY = -1, CSV_ERR_OUT_OF_RANGE = -2, CSV_ERR_IO_READ = -3, @@ -32,23 +32,23 @@ extern const csv_options_t csv_default_options; typedef struct { char *str; - int cap, pos; + int cap, pos; } csv_string_t; typedef struct { int *fields; - int cap, pos; + int cap, pos; } csv_field_t; typedef struct { const csv_options_t *csv_options; - csv_string_t csv_string; - csv_field_t csv_field; + csv_string_t csv_string; + csv_field_t csv_field; } csv_t; /* initialization */ void csv_init(csv_t *csv); -void csv_init_opt(csv_t *csv, const csv_options_t * const csv_options); +void csv_init_opt(csv_t *csv, const csv_options_t *const csv_options); /* cleanup after error */ void csv_cleanup(csv_t *csv); @@ -57,15 +57,15 @@ void csv_cleanup(csv_t *csv); int csv_read(csv_t *csv, FILE *in); /* field access */ -int csv_nfields(const csv_t * const csv); -const char * csv_field(const csv_t * const csv, int idx); +int csv_nfields(const csv_t *const csv); +const char *csv_field(const csv_t *const csv, int idx); /* write */ -void csv_write(FILE *out, const csv_t * const csv); -void csv_write_ex(FILE *out, int n, const char *fields[], const csv_options_t * const csv_options); +void csv_write(FILE *out, const csv_t *const csv); +void csv_write_ex(FILE *out, int n, const char *fields[], const csv_options_t *const csv_options); /* error handling */ -const char * csv_err_str(csv_err_t csv_err); +const char *csv_err_str(csv_err_t csv_err); #ifdef __cplusplus } -- cgit v1.3