diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2020-01-07 19:09:34 -0800 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2020-02-07 10:44:20 +0100 |
commit | e0a711cdde1d0390a922f80b69e3b365533b34cf (patch) | |
tree | d5f71e2e28a08b5e6dde57959679198a324ec49e /zutil.c | |
parent | 550f98395c8677ae9b08ec39433f5137e5cea2c8 (diff) |
Fixed formatting, 4 spaces for code intent, 2 spaces for preprocessor indent, initial function brace on the same line as definition, removed extraneous spaces and new lines.
Diffstat (limited to 'zutil.c')
-rw-r--r-- | zutil.c | 28 |
1 files changed, 10 insertions, 18 deletions
@@ -11,7 +11,7 @@ # include "gzguts.h" #endif #ifndef UNALIGNED_OK -# include "malloc.h" +# include <malloc.h> #endif const char * const zng_errmsg[10] = { @@ -28,22 +28,19 @@ const char * const zng_errmsg[10] = { }; const char zlibng_string[] = - " zlib-ng 1.9.9 forked from zlib 1.2.11 "; + " zlib-ng 1.9.9 forked from zlib 1.2.11 "; #ifdef ZLIB_COMPAT -const char * ZEXPORT zlibVersion(void) -{ +const char * ZEXPORT zlibVersion(void) { return ZLIB_VERSION; } #endif -const char * ZEXPORT zlibng_version(void) -{ +const char * ZEXPORT zlibng_version(void) { return ZLIBNG_VERSION; } -unsigned long ZEXPORT PREFIX(zlibCompileFlags)(void) -{ +unsigned long ZEXPORT PREFIX(zlibCompileFlags)(void) { unsigned long flags; flags = 0; @@ -93,15 +90,13 @@ unsigned long ZEXPORT PREFIX(zlibCompileFlags)(void) } #ifdef ZLIB_DEBUG -#include <stdlib.h> +# include <stdlib.h> # ifndef verbose # define verbose 0 # endif int ZLIB_INTERNAL z_verbose = verbose; -void ZLIB_INTERNAL z_error (m) - char *m; -{ +void ZLIB_INTERNAL z_error(char *m) { fprintf(stderr, "%s\n", m); exit(1); } @@ -110,15 +105,13 @@ void ZLIB_INTERNAL z_error (m) /* exported to allow conversion of error code to string for compress() and * uncompress() */ -const char * ZEXPORT PREFIX(zError)(int err) -{ +const char * ZEXPORT PREFIX(zError)(int err) { return ERR_MSG(err); } #ifndef MY_ZCALLOC /* Any system without a special alloc function */ -void ZLIB_INTERNAL *zng_calloc (void *opaque, unsigned items, unsigned size) -{ +void ZLIB_INTERNAL *zng_calloc(void *opaque, unsigned items, unsigned size) { (void)opaque; #ifndef UNALIGNED_OK return memalign(16, items * size); @@ -128,8 +121,7 @@ void ZLIB_INTERNAL *zng_calloc (void *opaque, unsigned items, unsigned size) #endif } -void ZLIB_INTERNAL zng_cfree (void *opaque, void *ptr) -{ +void ZLIB_INTERNAL zng_cfree(void *opaque, void *ptr) { (void)opaque; free(ptr); } |