diff --git a/BootROMs/logo-compress.c b/BootROMs/logo-compress.c index e4d2677..ff29143 100644 --- a/BootROMs/logo-compress.c +++ b/BootROMs/logo-compress.c @@ -2,13 +2,15 @@ #include #include -void pair(size_t count, uint8_t byte) { +void pair(size_t count, uint8_t byte) +{ static size_t unique_count = 0; static uint8_t unique_data[15]; if (count == 1) { unique_data[unique_count++] = byte; assert(unique_count <= 15); - } else { + } + else { assert(count <= 15); uint8_t control = (count << 4) | unique_count; putchar(control); @@ -19,7 +21,8 @@ void pair(size_t count, uint8_t byte) { if (count != 0) { putchar(byte); - } else { + } + else { assert(control == 0); } @@ -27,7 +30,8 @@ void pair(size_t count, uint8_t byte) { } } -int main(int argc, char *argv[]) { +int main(int argc, char *argv[]) +{ size_t count = 1; uint8_t byte = getchar(); int new; @@ -36,7 +40,8 @@ int main(int argc, char *argv[]) { while ((new = getchar()) != EOF) { if (byte == new) { count++; - } else { + } + else { pair(count, byte); byte = new; count = 1;