aboutsummaryrefslogtreecommitdiff
path: root/src/PGINDENT
diff options
context:
space:
mode:
Diffstat (limited to 'src/PGINDENT')
-rw-r--r--src/PGINDENT4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/PGINDENT b/src/PGINDENT
index ff694efb297..868e732246d 100644
--- a/src/PGINDENT
+++ b/src/PGINDENT
@@ -18,7 +18,8 @@ do
sed 's;/\* *---;/*---X_X;g' |
sed 's;\([} ]\)else[ ]*\(/\*.*\)$;\1else\
\2;g' | # workaround for indent bug
- detab -t4 -qc >/tmp/$$a
+ detab -t4 -qc |
+ sed 's;^DATA(.*$;/*&*/;' >/tmp/$$a # protect backslashes in DATA()
indent -bad -bap -bbb -bc -bl -d0 -cdb -nce -cli1 -di16 -nfc1 \
-lp -nip -nbc -psl -di1 -i4 -l75 -npro /tmp/$$a >/tmp/$$ 2>&1
if [ "$?" -ne 0 -o -s /tmp/$$ ]
@@ -26,6 +27,7 @@ do
cat /tmp/$$
fi
cat /tmp/$$a |
+ sed 's;^/\*\(DATA(.*\)\*/$;\1;' |
detab -t8 -qc |
entab -t4 -qc |
sed 's;/\*---X_X;/* ---;g' >/tmp/$$ && cat /tmp/$$ >$FILE