libzahl

big integer library
git clone git://git.suckless.org/libzahl
Log | Files | Refs | README | LICENSE

commit d703af0b0afa6eafefe95b56b4073c3a16c46be3
parent b0c1cae18066d0103a440894b5256939852021eb
Author: Mattias Andrée <maandree@kth.se>
Date:   Tue,  1 Mar 2016 18:42:43 +0100

Fix whitespace

Signed-off-by: Mattias Andrée <maandree@kth.se>

Diffstat:
Msrc/zbits.c | 4++--
Msrc/zload.c | 10+++++-----
Msrc/zlsb.c | 6+++---
Msrc/zsave.c | 6+++---
Msrc/zsetup.c | 2+-
5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/zbits.c b/src/zbits.c @@ -5,8 +5,8 @@ size_t zbits(z_t a) { - size_t i; - uint32_t x; + size_t i; + uint32_t x; if (zzero(a)) { return 1; } diff --git a/src/zload.c b/src/zload.c @@ -8,17 +8,17 @@ size_t zload(z_t a, const void *buffer) { - const char *buf = buffer; - a->sign = *((int *)buf), buf += sizeof(int); + const char *buf = buffer; + a->sign = *((int *)buf), buf += sizeof(int); a->used = *((size_t *)buf), buf += sizeof(size_t); - a->alloced = *((size_t *)buf), buf += sizeof(size_t); + a->alloced = *((size_t *)buf), buf += sizeof(size_t); if (a->alloced) { - a->chars = realloc(a->chars, a->alloced * sizeof(*(a->chars))); + a->chars = realloc(a->chars, a->alloced * sizeof(*(a->chars))); } else { a->chars = 0; } if (a->sign) { - memcpy(a->chars, buf, a->used * sizeof(*(a->chars))); + memcpy(a->chars, buf, a->used * sizeof(*(a->chars))); } return sizeof(z_t) - sizeof(a->chars) + (a->sign ? a->used * sizeof(*(a->chars)) : 0); } diff --git a/src/zlsb.c b/src/zlsb.c @@ -5,15 +5,15 @@ size_t zlsb(z_t a) { - size_t i = 0; - uint32_t x; + size_t i = 0; + uint32_t x; if (zzero(a)) { return SIZE_MAX; } for (;; i++) { x = a->chars[i]; if (x) { - x = ~x; + x = ~x; for (i *= BITS_PER_CHAR; x & 1; x >>= 1, i++); return i; } diff --git a/src/zsave.c b/src/zsave.c @@ -9,9 +9,9 @@ zsave(z_t a, void *buffer) { if (buffer) { char *buf = buffer; - *((int *)buf) = a->sign, buf += sizeof(int); - *((size_t *)buf) = a->used, buf += sizeof(size_t); - *((size_t *)buf) = a->alloced, buf += sizeof(size_t); + *((int *)buf) = a->sign, buf += sizeof(int); + *((size_t *)buf) = a->used, buf += sizeof(size_t); + *((size_t *)buf) = a->alloced, buf += sizeof(size_t); if (a->sign) { memcpy(buf, a->chars, a->used * sizeof(*(a->chars))); } diff --git a/src/zsetup.c b/src/zsetup.c @@ -12,7 +12,7 @@ int libzahl_set_up = 0; void zsetup(jmp_buf env) { - libzahl_jmp_buf = jmp_buf; + libzahl_jmp_buf = jmp_buf; if (!libzahl_set_up) { libzahl_set_up = 1;