re-indent

This commit is contained in:
CK Tan 2019-12-29 11:35:24 -08:00
parent 10787cbff9
commit 416be8de63

26
toml.h
View file

@ -43,16 +43,16 @@ typedef struct toml_array_t toml_array_t;
* Caller must toml_free(the-return-value) after use. * Caller must toml_free(the-return-value) after use.
*/ */
TOML_EXTERN toml_table_t* toml_parse_file(FILE* fp, TOML_EXTERN toml_table_t* toml_parse_file(FILE* fp,
char* errbuf, char* errbuf,
int errbufsz); int errbufsz);
/* Parse a string containing the full config. /* Parse a string containing the full config.
* Return a table on success, or 0 otherwise. * Return a table on success, or 0 otherwise.
* Caller must toml_free(the-return-value) after use. * Caller must toml_free(the-return-value) after use.
*/ */
TOML_EXTERN toml_table_t* toml_parse(char* conf, /* NUL terminated, please. */ TOML_EXTERN toml_table_t* toml_parse(char* conf, /* NUL terminated, please. */
char* errbuf, char* errbuf,
int errbufsz); int errbufsz);
/* Free the table returned by toml_parse() or toml_parse_file(). */ /* Free the table returned by toml_parse() or toml_parse_file(). */
TOML_EXTERN void toml_free(toml_table_t* tab); TOML_EXTERN void toml_free(toml_table_t* tab);
@ -121,14 +121,14 @@ TOML_EXTERN int toml_rtod_ex(const char* s, double* ret, char* buf, int buflen);
*/ */
typedef struct toml_timestamp_t toml_timestamp_t; typedef struct toml_timestamp_t toml_timestamp_t;
struct toml_timestamp_t { struct toml_timestamp_t {
struct { /* internal. do not use. */ struct { /* internal. do not use. */
int year, month, day; int year, month, day;
int hour, minute, second, millisec; int hour, minute, second, millisec;
char z[10]; char z[10];
} __buffer; } __buffer;
int *year, *month, *day; int *year, *month, *day;
int *hour, *minute, *second, *millisec; int *hour, *minute, *second, *millisec;
char* z; char* z;
}; };
/* Raw to Timestamp. Return 0 on success, -1 otherwise. */ /* Raw to Timestamp. Return 0 on success, -1 otherwise. */
@ -138,7 +138,7 @@ TOML_EXTERN int toml_rtots(const char* s, toml_timestamp_t* ret);
TOML_EXTERN int toml_utf8_to_ucs(const char* orig, int len, int64_t* ret); TOML_EXTERN int toml_utf8_to_ucs(const char* orig, int len, int64_t* ret);
TOML_EXTERN int toml_ucs_to_utf8(int64_t code, char buf[6]); TOML_EXTERN int toml_ucs_to_utf8(int64_t code, char buf[6]);
TOML_EXTERN void toml_set_memutil(void* (*xxmalloc)(size_t), TOML_EXTERN void toml_set_memutil(void* (*xxmalloc)(size_t),
void (*xxfree)(void*), void (*xxfree)(void*),
void* (*xxcalloc)(size_t, size_t), void* (*xxcalloc)(size_t, size_t),
void* (*xxrealloc)(void*, size_t)); void* (*xxrealloc)(void*, size_t));