diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-04-04 18:44:48 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-04-04 18:44:48 -0400 |
commit | a5e56a43541dbb1e5f9f8bd9e6ba6494935a7210 (patch) | |
tree | 85536f16dbf3f54cced278c0b4f4a6c059db40ff /devtools/reindent | |
parent | 59ecba222046a860b0a34f314886659996fb03f3 (diff) | |
download | gpsd-a5e56a43541dbb1e5f9f8bd9e6ba6494935a7210.tar.gz |
The failed attempt at reindenting should be kept for the record.
Diffstat (limited to 'devtools/reindent')
-rwxr-xr-x | devtools/reindent | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/devtools/reindent b/devtools/reindent new file mode 100755 index 00000000..3e364f4e --- /dev/null +++ b/devtools/reindent @@ -0,0 +1,26 @@ +#!/bin/sh +# Re-indent the codebase in a uniform style for readability. +# +# This is more or less a failed experiment, kept for the record. + +INDENT_OPTIONS = --indent-level4 \ + --honour-newlines \ + --dont-break-procedure-type \ + --cuddle-else \ + --braces-on-if-line \ + --case-brace-indentation0 \ + --brace-indent0 \ + --no-space-after-casts \ + --no-space-after-function-call-names \ + --start-left-side-of-comments \ + --dont-format-comments +indent: + chmod u+w *maskdump.c + indent $(INDENT_OPTIONS) *.c + for f in *.c; \ + do \ + sed <$${f} >/tmp/reindent$$$$ -e 's/@ \*/@*/' ; \ + mv /tmp/reindent$$$$ $${f} ; \ + done + chmod u-w *maskdump.c + @echo "Diff lines:" `git diff | wc -l` |