# --------------------------
# Install indent & astyle in RHEL/Fedora/CentOS/AlmaLinux/Ubuntu/Debian
# --------------------------
$ dnf install indent astyle
$ apt install indent astyle
# --------------------------
# then reformat your example.c
# --------------------------
$ indent -nbad -bap -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli4 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l95 -lp -npcs -nprs -npsl -saf -sai -saw -nsc -nsob -nss -ut -ts4 example.c
$ astyle --style=allman example.c