Skip to content

Commit a90f12f

Browse files
committed
Modifications for indenting.
1 parent 1ccd423 commit a90f12f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/PGINDENT

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,20 @@ do
2929
\2;g' | # workaround for indent bug
3030
detab -t4 -qc |
3131
sed 's;^DATA(.*$;/*&*/;' >/tmp/$$a # protect backslashes in DATA()
32-
indent -bad -bap -bbb -bc -bl -d0 -cdb -nce -nfc1 -di16 -i4 -l75 \
32+
indent -bad -bap -bbb -bc -bl -d0 -cdb -cli1 -nce -nfc1 -di12 -i4 -l75 \
3333
-lp -nip -npro /tmp/$$a >/tmp/$$ 2>&1
3434
if [ "$?" -ne 0 -o -s /tmp/$$ ]
3535
then echo "$FILE"
3636
cat /tmp/$$
3737
fi
3838
cat /tmp/$$a |
3939
sed 's;^/\*\(DATA(.*\)\*/$;\1;' |
40+
sed 's;/\*---X_X;/* ---;g' |
41+
sed 's;^static[ ][ ]*;static ;g' | # workaround indent bug
4042
detab -t8 -qc |
41-
entab -t4 -qc |
42-
sed 's;/\*---X_X;/* ---;g' >/tmp/$$ && cat /tmp/$$ >$FILE
43+
entab -t4 -qc >/tmp/$$ && cat /tmp/$$ >$FILE
4344
done
4445

46+
# The 'for' loop makes these backup files useless
47+
# so delete them
48+
rm -f *a.BAK

0 commit comments

Comments
 (0)