From b72e62374d35f9b1f261e79fc1e25e726ca48383 Mon Sep 17 00:00:00 2001 From: Bruce Momjian <bruce@momjian.us> Date: Sat, 6 Sep 1997 18:27:11 +0000 Subject: [PATCH] More cleanups for indent. --- src/PGINDENT | 4 +++- src/backend/catalog/genbki.sh | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 6 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 diff --git a/src/backend/catalog/genbki.sh b/src/backend/catalog/genbki.sh index 2b54a7aa638..32496694543 100644 --- a/src/backend/catalog/genbki.sh +++ b/src/backend/catalog/genbki.sh @@ -10,7 +10,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.7 1997/09/06 00:22:36 momjian Exp $ +# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.8 1997/09/06 18:27:11 momjian Exp $ # # NOTES # non-essential whitespace is removed from the generated file. @@ -54,13 +54,20 @@ done # ---------------- # also, change Oid to oid. -- AY 8/94. # also, change NameData to name. -- jolly 8/21/95. +# put multi-line start/end comments on a separate line # cat $SYSFILES | \ -sed -e 's/\/\*.*\*\///g' \ - -e 's/;[ ]*$//g' \ +sed -e 's;/\*.*\*/;;g' \ + -e 's;/\*;\ +/*\ +;g' \ + -e 's;\*/;\ +*/\ +;g' | # we must run a new sed here to see the newlines we added +sed -e 's/;[ ]*$//g' \ -e 's/^[ ]*//' \ - -e 's/\[ ]Oid/\ oid/g' \ - -e 's/\[ ]NameData/\ name/g' \ + -e 's/[ ]Oid/\ oid/g' \ + -e 's/[ ]NameData/\ name/g' \ -e 's/^Oid/oid/g' \ -e 's/^NameData/\name/g' \ -e 's/(NameData/(name/g' \ -- GitLab