Skip to content

Commit 0c2c061

Browse files
committed
Cleanup for new else/comment handling.
1 parent eae7e00 commit 0c2c061

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

src/backend/utils/mb/conv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/utils/mb/conv.c,v 1.64 2007/11/15 23:23:44 momjian Exp $
9+
* $PostgreSQL: pgsql/src/backend/utils/mb/conv.c,v 1.65 2007/11/16 01:11:04 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -461,7 +461,7 @@ UtfToLocal(const unsigned char *utf, unsigned char *iso,
461461
code = p->code;
462462
}
463463
}
464-
else /* no cmap or no remaining data */
464+
else /* no cmap or no remaining data */
465465
{
466466
p = bsearch(&iutf, map, size1,
467467
sizeof(pg_utf_to_local), compare1);

src/bin/psql/mbprint.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/mbprint.c,v 1.27 2007/11/15 23:23:44 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/mbprint.c,v 1.28 2007/11/16 01:11:04 momjian Exp $
77
*
88
* XXX this file does not really belong in psql/. Perhaps move to libpq?
99
* It also seems that the mbvalidate function is redundant with existing
@@ -246,7 +246,7 @@ pg_wcssize(unsigned char *pwcs, size_t len, int encoding, int *result_width,
246246
linewidth += 4;
247247
format_size += 4;
248248
}
249-
else /* Output it as-is */
249+
else /* Output it as-is */
250250
{
251251
linewidth += w;
252252
format_size += 1;
@@ -257,7 +257,7 @@ pg_wcssize(unsigned char *pwcs, size_t len, int encoding, int *result_width,
257257
linewidth += 6; /* \u0000 */
258258
format_size += 6;
259259
}
260-
else /* All other chars */
260+
else /* All other chars */
261261
{
262262
linewidth += w;
263263
format_size += chlen;
@@ -321,7 +321,7 @@ pg_wcsformat(unsigned char *pwcs, size_t len, int encoding,
321321
linewidth += 4;
322322
ptr += 4;
323323
}
324-
else /* Output it as-is */
324+
else /* Output it as-is */
325325
{
326326
linewidth += w;
327327
*ptr++ = *pwcs;
@@ -343,7 +343,7 @@ pg_wcsformat(unsigned char *pwcs, size_t len, int encoding,
343343
ptr += 6;
344344
linewidth += 6;
345345
}
346-
else /* All other chars */
346+
else /* All other chars */
347347
{
348348
int i;
349349

src/tools/pgindent/pgindent

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.94 2007/11/15 23:23:44 momjian Exp $
3+
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.95 2007/11/16 01:11:04 momjian Exp $
44

55
# Known bugs:
66
#
@@ -46,9 +46,10 @@ do
4646
# 'else' followed by a single-line comment, followed by
4747
# a brace on the next line confuses BSD indent, so we push
4848
# the comment down to the next line, then later pull it
49-
# back up again.
49+
# back up again. Add space before PGMV or indent will add
50+
# it for us.
5051
sed 's;\([} ]\)else[ ]*\(/\*\)\(.*\*/\)[ ]*$;\1else\
51-
\2PGINDENT_MOVED\3;g' |
52+
\2 PGMV\3;g' |
5253

5354
# Indent multi-line after-'else' comment so BSD indent will move it properly.
5455
# We already moved down single-line comments above. Check for '*' to make
@@ -2243,10 +2244,10 @@ do
22432244
{
22442245
if (NR != 1)
22452246
{
2246-
if ($0 ~ "/\*PGINDENT_MOVED")
2247+
if ($0 ~ "/\* PGMV")
22472248
{
22482249
# remove tag
2249-
sub("PGINDENT_MOVED", "", $0);
2250+
sub(" PGMV", "", $0);
22502251
# remove leading whitespace
22512252
sub("^[ ]*", "", $0);
22522253
# add comment with single tab prefix

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy