Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 281b7d8

Browse files
committed
Add // -> /* */ mapping to pgindent.
1 parent 97aa5fc commit 281b7d8

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

contrib/intarray/_int.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ g_int_compress(GISTENTRY *entry)
194194

195195
#ifdef GIST_DEBUG
196196
elog(NOTICE, "COMP IN: %d leaf; %d rel; %d page; %d offset; %d bytes; %d elems", entry->leafkey, (int)entry->rel, (int)entry->page, (int)entry->offset, (int)entry->bytes, len);
197-
//printarr( r, len );
197+
/* printarr( r, len ); */
198198
#endif
199199

200200
if ( len >= 2*MAXNUMRANGE ) { /*compress*/
@@ -260,7 +260,7 @@ g_int_decompress(GISTENTRY *entry)
260260

261261
#ifdef GIST_DEBUG
262262
elog(NOTICE, "DECOMP IN: %d leaf; %d rel; %d page; %d offset; %d bytes; %d elems", entry->leafkey, (int)entry->rel, (int)entry->page, (int)entry->offset, (int)entry->bytes, lenin);
263-
//printarr( in, lenin );
263+
/* printarr( in, lenin ); */
264264
#endif
265265

266266
lenr = internal_size(din, lenin);
@@ -653,7 +653,7 @@ inner_int_union ( ArrayType *a, ArrayType *b ) {
653653
int i,j;
654654

655655
#ifdef GIST_DEBUG
656-
//elog(NOTICE, "inner_union %d %d", ARRISNULL( a ) , ARRISNULL( b ) );
656+
/* elog(NOTICE, "inner_union %d %d", ARRISNULL( a ) , ARRISNULL( b ) ); */
657657
#endif
658658

659659
if ( ARRISNULL( a ) && ARRISNULL( b ) ) return new_intArrayType(0);
@@ -709,7 +709,7 @@ inner_int_inter ( ArrayType *a, ArrayType *b ) {
709709
int i,j;
710710

711711
#ifdef GIST_DEBUG
712-
//elog(NOTICE, "inner_inter %d %d", ARRISNULL( a ), ARRISNULL( b ) );
712+
/* elog(NOTICE, "inner_inter %d %d", ARRISNULL( a ), ARRISNULL( b ) ); */
713713
#endif
714714

715715
if ( ARRISNULL( a ) || ARRISNULL( b ) ) return NULL;

src/backend/optimizer/util/clauses.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.79 2001/01/24 19:42:59 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.80 2001/02/12 18:30:52 momjian Exp $
1212
*
1313
* HISTORY
1414
* AUTHOR DATE MAJOR EVENT
@@ -1606,7 +1606,7 @@ simplify_op_or_func(Expr *expr, List *args)
16061606
* {
16071607
* if (node == NULL)
16081608
* return false;
1609-
* // check for nodes that special work is required for, eg:
1609+
* # check for nodes that special work is required for, eg:
16101610
* if (IsA(node, Var))
16111611
* {
16121612
* ... do special actions for Var nodes
@@ -1615,7 +1615,7 @@ simplify_op_or_func(Expr *expr, List *args)
16151615
* {
16161616
* ... do special actions for other node types
16171617
* }
1618-
* // for any node type not specially processed, do:
1618+
* # for any node type not specially processed, do:
16191619
* return expression_tree_walker(node, my_walker, (void *) context);
16201620
* }
16211621
*
@@ -1659,7 +1659,7 @@ simplify_op_or_func(Expr *expr, List *args)
16591659
* {
16601660
* adjust context for subquery;
16611661
* result = query_tree_walker((Query *) node, my_walker, context,
1662-
* true); // to visit subquery RTEs too
1662+
* true); # to visit subquery RTEs too
16631663
* restore context if needed;
16641664
* return result;
16651665
* }
@@ -1909,7 +1909,7 @@ query_tree_walker(Query *query,
19091909
* {
19101910
* if (node == NULL)
19111911
* return NULL;
1912-
* // check for nodes that special work is required for, eg:
1912+
* # check for nodes that special work is required for, eg:
19131913
* if (IsA(node, Var))
19141914
* {
19151915
* ... create and return modified copy of Var node
@@ -1918,7 +1918,7 @@ query_tree_walker(Query *query,
19181918
* {
19191919
* ... do special transformations of other node types
19201920
* }
1921-
* // for any node type not specially processed, do:
1921+
* # for any node type not specially processed, do:
19221922
* return expression_tree_mutator(node, my_mutator, (void *) context);
19231923
* }
19241924
*

src/tools/pgindent/pgindent

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ fi
2525
for FILE
2626
do
2727
cat $FILE |
28+
# convert // comments to /* */
29+
sed 's;^\([ ]*\)//\(.*\)$;\1/* \2 */;g' |
30+
# mark some comments for special treatment later
2831
sed 's;/\* *---;/*---X_X;g' |
2932
# workaround for indent bug with 'else' handling
3033
sed 's;\([} ]\)else[ ]*\(/\*.*\)$;\1else\

0 commit comments

Comments
 (0)