File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -37,3 +37,11 @@ following options:
37
37
38
38
find . \( -name '*.java' -o -name '*.java.in' \) -print |
39
39
xargs -n100 pgjindent
40
+ ---------------------------------------------------------------------------
41
+
42
+ For cpp, we use astyle, http://astyle.sourceforge.net/, with the
43
+ following options:
44
+
45
+ find src/interfaces/libpq++ -name '*.[ch]' -print |
46
+ xargs -n100 pgcppindent
47
+
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ trap " rm -f /tmp/$$ /tmp/$$ a" 0 1 2 3 15
4
+ entab < /dev/null > /dev/null
5
+ if [ " $? " -ne 0 ]
6
+ then echo " Go to the src/tools/entab directory and do a 'make' and 'make install'." >&2
7
+ echo " This will put the 'entab' command in your path." >&2
8
+ echo " Then run $0 again."
9
+ exit 1
10
+ fi
11
+ astyle --version < /dev/null > /dev/null 2>&1
12
+ if [ " $? " -eq 0 ]
13
+ then echo " You do not appear to have 'astyle' installed on your system." >&2
14
+ exit 1
15
+ fi
16
+
17
+ for FILE
18
+ do
19
+ astyle --style=ansi -b -p -S < " $FILE " > /tmp/$$ 2> /tmp/$$ a
20
+ if [ " $? " -ne 0 -o -s /tmp/$$ a ]
21
+ then echo " $FILE "
22
+ cat /tmp/$$ a
23
+ fi
24
+ cat /tmp/$$ |
25
+ entab -t4 -qc |
26
+ cat > /tmp/$$ a && cat /tmp/$$ a > " $FILE "
27
+ done
You can’t perform that action at this time.
0 commit comments