Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59da210

Browse files
committed
Update to prevent CATALOG() from wrapping.
1 parentbbc7491 commit59da210

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/tools/pgindent/pgindent

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ do
3939
intpgindent_func_no_var_fix;\
4040
,g'|
4141
# protect backslashes in DATA()
42-
sed's;^DATA(.*$;/*&*/;'>/tmp/$$a
42+
sed's;^DATA(.*$;/*&*/;'|
43+
# protect wrapping in CATALOG()
44+
sed's;^CATALOG(.*$;/*&*/;'>/tmp/$$a
4345

4446
# We get the list of typedef's from /src/tools/find_typedef
4547
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l75 \
@@ -1282,6 +1284,7 @@ intpgindent_func_no_var_fix;\
12821284
fi
12831285
cat /tmp/$$a|
12841286
sed's;^/\*\(DATA(.*\)\*/$;\1;'|
1287+
sed's;^/\*\(CATALOG(.*\)\*/$;\1;'|
12851288
sed's;/\*---X_X;/* ---;g'|
12861289
# workaround indent bug
12871290
sed's;^static[ ][ ]*;static ;g'|
@@ -1366,9 +1369,9 @@ intpgindent_func_no_var_fix;\
13661369
print line2;
13671370
}'|
13681371
# remove blank line before #endif
1369-
awk'
1370-
{
1371-
line2 = $0;
1372+
awk'BEGIN{line1 = ""; line2 = ""; skips = 0}
1373+
{
1374+
line2 = $0;
13721375
if (skips > 0)
13731376
skips--;
13741377
if (line1 ~ "^$" &&

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp