From: phfr24 Date: Sun, 26 Oct 2025 02:26:06 +0000 (-0300) Subject: formatting X-Git-Url: https://git.wirehaze.ovh/lifeboot.git/commitdiff_plain/535076b839d14aeb4502b7b8479dcb6d3eb51cf0?hp=b95d9b6bf0cb9579abf2510f0284a70b09b3c628 formatting --- diff --git a/prototype.c b/prototype.c index c9c2afa..c297953 100644 --- a/prototype.c +++ b/prototype.c @@ -1,8 +1,8 @@ #include #include -#include #include #include +#include #define COLS 80 #define ROWS 25 @@ -15,13 +15,9 @@ #define STR(x) _STR(x) #define _STR(x) #x -static void clearscr() { - printf("\e[1;1H\e[2J"); -} +static void clearscr() { printf("\e[1;1H\e[2J"); } -static void print_row(char row[COLS]) { - printf("%." STR(COLS) "s\n", row); -} +static void print_row(char row[COLS]) { printf("%." STR(COLS) "s\n", row); } static void print_grid(char grid[COLS * ROWS]) { for (int i = 0; i < ROWS; i++) @@ -85,7 +81,7 @@ static void update_grid(char grid[COLS * ROWS]) { memcpy(grid, new, COLS * ROWS); } -int main () { +int main() { char grid[COLS * ROWS]; srand(time(0));