Apply clang-format code style to all source files

This commit is contained in:
icex2
2019-10-20 00:50:40 +02:00
parent c600e1a423
commit c3bc8782f4
401 changed files with 13844 additions and 11361 deletions
+12 -13
View File
@@ -17,8 +17,8 @@
* false for binary mode
* @return True on success, false on error
*/
bool file_load(const char *filename, void **bytes, size_t *nbytes,
bool text_mode);
bool file_load(
const char *filename, void **bytes, size_t *nbytes, bool text_mode);
/**
* Save a buffer to a file (overwrite any existing files with the same name)
@@ -36,7 +36,7 @@ bool file_save(const char *filename, const void *bytes, size_t nbytes);
* @param path Path as c-string.
* @return True if exists, false otherwise
*/
bool path_exists(const char* path);
bool path_exists(const char *path);
/**
* Check if a normal file, folder, symlink, ... exists
@@ -44,10 +44,9 @@ bool path_exists(const char* path);
* @param path Path as w-string.
* @return True if exists, false otherwise
*/
bool path_exists_wstr(const wchar_t* path);
bool path_exists_wstr(const wchar_t *path);
FILE *fopen_appdata(const char *vendor, const char *filename,
const char *mode);
FILE *fopen_appdata(const char *vendor, const char *filename, const char *mode);
/**
* Create a new directory
@@ -58,17 +57,17 @@ FILE *fopen_appdata(const char *vendor, const char *filename,
bool path_mkdir(const char *path);
char *path_next_element(char *path);
#define read_bin(f, val, size) (fread((val), (size), 1, (f)) == 1)
#define read_u8(f, val) (fread((val), 1, 1, (f)) == 1)
#define read_u16(f, val) (fread((val), 2, 1, (f)) == 1)
#define read_u32(f, val) (fread((val), 4, 1, (f)) == 1)
#define read_bin(f, val, size) (fread((val), (size), 1, (f)) == 1)
#define read_u8(f, val) (fread((val), 1, 1, (f)) == 1)
#define read_u16(f, val) (fread((val), 2, 1, (f)) == 1)
#define read_u32(f, val) (fread((val), 4, 1, (f)) == 1)
bool read_str(FILE *f, char **str);
#define write_bin(f, val, size) fwrite((val), (size), 1, (f))
#define write_u8(f, val) fwrite((val), 1, 1, (f))
#define write_u16(f, val) fwrite((val), 2, 1, (f))
#define write_u32(f, val) fwrite((val), 4, 1, (f))
#define write_u8(f, val) fwrite((val), 1, 1, (f))
#define write_u16(f, val) fwrite((val), 2, 1, (f))
#define write_u32(f, val) fwrite((val), 4, 1, (f))
void write_str(FILE *f, const char *str);