Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
c853ca05
Commit
c853ca05
authored
27 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Update pgpatch for GNU.
parent
c8bc4a4e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tools/pgindent.dir/pgindent
+14
-3
14 additions, 3 deletions
src/tools/pgindent.dir/pgindent
with
14 additions
and
3 deletions
src/tools/pgindent.dir/pgindent
+
14
−
3
View file @
c853ca05
...
@@ -5,12 +5,21 @@
...
@@ -5,12 +5,21 @@
#
#
# On 09/06/1997, from the top directory, I ran:
# On 09/06/1997, from the top directory, I ran:
#
#
# find . -name '*.[ch]' -type f -print | grep -v '++' | xargs -n100
PGINDENT
# find . -name '*.[ch]' -type f -print | grep -v '++' | xargs -n100
pgindent
#
#
# The stock BSD indent has two bugs. First, a comment after the word 'else'
# The stock BSD indent has two bugs. First, a comment after the word 'else'
# causes the rest of the file to be ignored. Second, it silently ignores
# causes the rest of the file to be ignored. Second, it silently ignores
# typedesf after getting the first 100.
# typedefs after getting the first 100.
#
# Both problems are worked-around in this script.
# Both problems are worked-around in this script.
# We also include a patch for the second bug in:
# /src/tools/pgindent/indent.bsd.patch
# Even with the workaround, installation of the patch produces better output.
#
# GNU indent has many bugs, and it not recommended. See the description
# below.
#
# We get the list of typedef's from /src/tools/find_typedef
#
#
trap
"rm -f /tmp/
$$
/tmp/
$$
a"
0 1 2 3 15
trap
"rm -f /tmp/
$$
/tmp/
$$
a"
0 1 2 3 15
...
@@ -27,7 +36,7 @@ then echo "You do not appear to have 'indent' installed on your system." >&2
...
@@ -27,7 +36,7 @@ then echo "You do not appear to have 'indent' installed on your system." >&2
exit
1
exit
1
fi
fi
indent
-version
-npro
</dev/null
>
/dev/null 2>&1
indent
-version
-npro
</dev/null
>
/dev/null 2>&1
if
[
"
$?
"
-
n
e
0
]
if
[
"
$?
"
-e
q
0
]
then
echo
"You appear to have GNU indent rather than BSD indent."
>
&2
then
echo
"You appear to have GNU indent rather than BSD indent."
>
&2
echo
"Be warned, it has some small bugs, GNU indent version 1.9.1."
>
&2
echo
"Be warned, it has some small bugs, GNU indent version 1.9.1."
>
&2
echo
"These bugs become pretty major when you are doing >200k lines of code."
>
&2
echo
"These bugs become pretty major when you are doing >200k lines of code."
>
&2
...
@@ -48,6 +57,8 @@ do
...
@@ -48,6 +57,8 @@ do
\2;g'
|
# workaround for indent bug
\2;g'
|
# workaround for indent bug
detab
-t4
-qc
|
detab
-t4
-qc
|
sed
's;^DATA(.*$;/*&*/;'
>
/tmp/
$$
a
# protect backslashes in DATA()
sed
's;^DATA(.*$;/*&*/;'
>
/tmp/
$$
a
# protect backslashes in DATA()
# We get the list of typedef's from /src/tools/find_typedef
indent
-bad
-bap
-bc
-bl
-d0
-cdb
-nce
-nfc1
-di12
-i4
-l75
\
indent
-bad
-bap
-bc
-bl
-d0
-cdb
-nce
-nfc1
-di12
-i4
-l75
\
-lp
-nip
-npro
$EXTRA_OPTS
\
-lp
-nip
-npro
$EXTRA_OPTS
\
-TA_Const
\
-TA_Const
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment