reindent 691 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. # Re-indent the codebase in a uniform style for readability.
  3. #
  4. # This is more or less a failed experiment, kept for the record.
  5. INDENT_OPTIONS = --indent-level4 \
  6. --honour-newlines \
  7. --dont-break-procedure-type \
  8. --cuddle-else \
  9. --braces-on-if-line \
  10. --case-brace-indentation0 \
  11. --brace-indent0 \
  12. --no-space-after-casts \
  13. --no-space-after-function-call-names \
  14. --start-left-side-of-comments \
  15. --dont-format-comments
  16. indent:
  17. chmod u+w *maskdump.c
  18. indent $(INDENT_OPTIONS) *.c
  19. for f in *.c; \
  20. do \
  21. sed <$${f} >/tmp/reindent$$$$ -e 's/@ \*/@*/' ; \
  22. mv /tmp/reindent$$$$ $${f} ; \
  23. done
  24. chmod u-w *maskdump.c
  25. @echo "Diff lines:" `git diff | wc -l`