From 29a976296cbf21827c31b2b6433478419becfe01 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 25 Jun 2007 15:18:41 +0000 Subject: r23598: Add script for running indent and remove .indent.pro file (This used to be commit 58a68daef0e4b34606c63670982e95298804a99b) --- source3/script/format_indent.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 source3/script/format_indent.sh (limited to 'source3/script/format_indent.sh') diff --git a/source3/script/format_indent.sh b/source3/script/format_indent.sh new file mode 100755 index 0000000000..d901de3ebd --- /dev/null +++ b/source3/script/format_indent.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# -npro Do no read the '.indent.pro' files. +# -l80 Set maximum line length for non-comment lines to 80. +# -bad Force blank lines after the declarations. +# -bap Force blank lines after procedure bodies. +# -bbb Force blank lines before block comments. +# -br Put braces on line with if, etc. +# -ce Cuddle else and preceeding ‘}’. +# -ut Use tabs. +# -ts8 Set tab size to 8 spaces +# -i8 Set indentation level to 8 spaces. +# -di1 Put variables in column 1. +# -brs Put braces on struct declaration line. +# -npsl Put the type of a procedure on the same line as its name. +# -npcs Do not put space after the function in function calls. +# -nprs Do not put a space after every ’(’ and before every ’)’. +# -bbo Prefer to break long lines before boolean operators. +# -hnl Prefer to break long lines at the position of newlines in the input. + +indent -npro -l80 -bad -bap -bbb -br -ce -ut -ts8 -i8 -di1 -brs -npsl -npcs -nprs -bbo -hnl "$@" -- cgit From 386267447b9043eafb8497c0f1fca0f7eead821b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 25 Jun 2007 15:23:19 +0000 Subject: r23599: Add new version of indent script copied from the the Linux kernel tree. (This used to be commit bc422ab5f152c3d7ff730a2e0a80ad3a196a797a) --- source3/script/format_indent.sh | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'source3/script/format_indent.sh') diff --git a/source3/script/format_indent.sh b/source3/script/format_indent.sh index d901de3ebd..2af1ab41fa 100755 --- a/source3/script/format_indent.sh +++ b/source3/script/format_indent.sh @@ -1,21 +1,12 @@ #!/bin/sh # -npro Do no read the '.indent.pro' files. -# -l80 Set maximum line length for non-comment lines to 80. -# -bad Force blank lines after the declarations. -# -bap Force blank lines after procedure bodies. -# -bbb Force blank lines before block comments. -# -br Put braces on line with if, etc. -# -ce Cuddle else and preceeding ‘}’. -# -ut Use tabs. -# -ts8 Set tab size to 8 spaces +# -kr Use K&R formatting rules # -i8 Set indentation level to 8 spaces. -# -di1 Put variables in column 1. -# -brs Put braces on struct declaration line. -# -npsl Put the type of a procedure on the same line as its name. -# -npcs Do not put space after the function in function calls. -# -nprs Do not put a space after every ’(’ and before every ’)’. -# -bbo Prefer to break long lines before boolean operators. -# -hnl Prefer to break long lines at the position of newlines in the input. +# -ts8 Set tab size to 8 spaces +# -sob Swallow optional blank lines. +# -l80 Set the maximum line length at 80 characters. +# -ss On one-line for and while statments, force a blank before the semicolon +# -ncs Do not put a space after cast operators. -indent -npro -l80 -bad -bap -bbb -br -ce -ut -ts8 -i8 -di1 -brs -npsl -npcs -nprs -bbo -hnl "$@" +indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs "$@" -- cgit