forked from stargieg/bacnet-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindent.bat
30 lines (29 loc) · 1.5 KB
/
indent.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@echo off
rem Indent the C and H files with specific coding standard
rem requires 'indent.exe' from MSYS (MinGW).
rem See http://www.gnu.org/software/indent/manual/indent.pdf
rem -kr The Kernighan & Ritchie style, corresponds to the following options:
rem -nbad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0
rem -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs
rem -nprs -npsl -saf -sai -saw -nsc -nsob -nss
rem -nut Use spaces instead of tabs.
rem -nlp Do not line up parentheses.
rem -ip4 Indent parameter types in old-style function definitions by n spaces.
rem -cli4 Case label indent of n spaces.
rem -bfda Break the line before all arguments in a declaration.
rem -nbc Do not force newlines after commas in declarations.
rem -nbbo Do not prefer to break long lines before boolean operators.
rem -c0 Put comments to the right of code in column n.
rem -cd0 Put comments to the right of the declarations in column n.
rem -cp0 Put comments to the right of #else and #endif statements in column n.
rem -di0 Put variables in column n.
rem -l79 Set maximum line length for non-comment lines to n.
rem -nhnl Do not prefer to break long lines at the position of newlines in the input.
echo Fixing Unix/DOS line endings for "%1"
unix2dos.exe "%1"
echo Setting Subversion EOL Style for "%1"
svn.exe propset svn:eol-style native "%1"
svn.exe propset svn:mime-type text/plain "%1"
echo Indenting "%1"
set OPTIONS=-kr -nut -nlp -ip4 -cli4 -bfda -nbc -nbbo -c0 -cd0 -cp0 -di0 -l79 -nhnl
indent.exe "%1" -o "%1" %OPTIONS%