@@ -29,7 +29,9 @@ static VarBit *bitsubstring(VarBit *arg, int32 s, int32 l,
2929static VarBit * bit_overlay (VarBit * t1 ,VarBit * t2 ,int sp ,int sl );
3030
3131
32- /* common code for bittypmodin and varbittypmodin */
32+ /*
33+ * common code for bittypmodin and varbittypmodin
34+ */
3335static int32
3436anybit_typmodin (ArrayType * ta ,const char * typename )
3537{
@@ -64,7 +66,9 @@ anybit_typmodin(ArrayType *ta, const char *typename)
6466return typmod ;
6567}
6668
67- /* common code for bittypmodout and varbittypmodout */
69+ /*
70+ * common code for bittypmodout and varbittypmodout
71+ */
6872static char *
6973anybit_typmodout (int32 typmod )
7074{
@@ -233,8 +237,10 @@ bit_out(PG_FUNCTION_ARGS)
233237/* same as varbit output */
234238return varbit_out (fcinfo );
235239#else
236- /* This is how one would print a hex string, in case someone wants to
237- write a formatting function. */
240+ /*
241+ * This is how one would print a hex string, in case someone wants to
242+ * write a formatting function.
243+ */
238244VarBit * s = PG_GETARG_VARBIT_P (0 );
239245char * result ,
240246* r ;
@@ -330,7 +336,8 @@ bit_send(PG_FUNCTION_ARGS)
330336return varbit_send (fcinfo );
331337}
332338
333- /* bit()
339+ /*
340+ * bit()
334341 * Converts a bit() type to a specific internal length.
335342 * len is the bitlength specified in the column definition.
336343 *
@@ -523,7 +530,8 @@ varbit_in(PG_FUNCTION_ARGS)
523530PG_RETURN_VARBIT_P (result );
524531}
525532
526- /* varbit_out -
533+ /*
534+ * varbit_out -
527535 * Prints the string as bits to preserve length accurately
528536 */
529537Datum
@@ -636,7 +644,8 @@ varbit_send(PG_FUNCTION_ARGS)
636644PG_RETURN_BYTEA_P (pq_endtypsend (& buf ));
637645}
638646
639- /* varbit()
647+ /*
648+ * varbit()
640649 * Converts a varbit() type to a specific internal length.
641650 * len is the maximum bitlength specified in the column definition.
642651 *
@@ -718,7 +727,8 @@ varbittypmodout(PG_FUNCTION_ARGS)
718727 * need to be so careful.
719728 */
720729
721- /* bit_cmp
730+ /*
731+ * bit_cmp
722732 *
723733 * Compares two bitstrings and returns <0, 0, >0 depending on whether the first
724734 * string is smaller, equal, or bigger than the second. All bits are considered
@@ -871,7 +881,8 @@ bitcmp(PG_FUNCTION_ARGS)
871881PG_RETURN_INT32 (result );
872882}
873883
874- /* bitcat
884+ /*
885+ * bitcat
875886 * Concatenation of bit strings
876887 */
877888Datum
@@ -931,7 +942,8 @@ bit_catenate(VarBit *arg1, VarBit *arg2)
931942return result ;
932943}
933944
934- /* bitsubstr
945+ /*
946+ * bitsubstr
935947 * retrieve a substring from the bit string.
936948 * Note, s is 1-based.
937949 * SQL draft 6.10 9)
@@ -1105,7 +1117,8 @@ bit_overlay(VarBit *t1, VarBit *t2, int sp, int sl)
11051117return result ;
11061118}
11071119
1108- /* bitlength, bitoctetlength
1120+ /*
1121+ * bitlength, bitoctetlength
11091122 * Return the length of a bit string
11101123 */
11111124Datum
@@ -1124,11 +1137,12 @@ bitoctetlength(PG_FUNCTION_ARGS)
11241137PG_RETURN_INT32 (VARBITBYTES (arg ));
11251138}
11261139
1127- /* bitand
1140+ /*
1141+ * bit_and
11281142 * perform a logical AND on two bit strings.
11291143 */
11301144Datum
1131- bitand (PG_FUNCTION_ARGS )
1145+ bit_and (PG_FUNCTION_ARGS )
11321146{
11331147VarBit * arg1 = PG_GETARG_VARBIT_P (0 );
11341148VarBit * arg2 = PG_GETARG_VARBIT_P (1 );
@@ -1164,11 +1178,12 @@ bitand(PG_FUNCTION_ARGS)
11641178PG_RETURN_VARBIT_P (result );
11651179}
11661180
1167- /* bitor
1181+ /*
1182+ * bit_or
11681183 * perform a logical OR on two bit strings.
11691184 */
11701185Datum
1171- bitor (PG_FUNCTION_ARGS )
1186+ bit_or (PG_FUNCTION_ARGS )
11721187{
11731188VarBit * arg1 = PG_GETARG_VARBIT_P (0 );
11741189VarBit * arg2 = PG_GETARG_VARBIT_P (1 );
@@ -1210,7 +1225,8 @@ bitor(PG_FUNCTION_ARGS)
12101225PG_RETURN_VARBIT_P (result );
12111226}
12121227
1213- /* bitxor
1228+ /*
1229+ * bitxor
12141230 * perform a logical XOR on two bit strings.
12151231 */
12161232Datum
@@ -1257,7 +1273,8 @@ bitxor(PG_FUNCTION_ARGS)
12571273PG_RETURN_VARBIT_P (result );
12581274}
12591275
1260- /* bitnot
1276+ /*
1277+ * bitnot
12611278 * perform a logical NOT on a bit string.
12621279 */
12631280Datum
@@ -1289,7 +1306,8 @@ bitnot(PG_FUNCTION_ARGS)
12891306PG_RETURN_VARBIT_P (result );
12901307}
12911308
1292- /* bitshiftleft
1309+ /*
1310+ * bitshiftleft
12931311 * do a left shift (i.e. towards the beginning of the string)
12941312 */
12951313Datum
@@ -1348,7 +1366,8 @@ bitshiftleft(PG_FUNCTION_ARGS)
13481366PG_RETURN_VARBIT_P (result );
13491367}
13501368
1351- /* bitshiftright
1369+ /*
1370+ * bitshiftright
13521371 * do a right shift (i.e. towards the end of the string)
13531372 */
13541373Datum
@@ -1575,7 +1594,8 @@ bittoint8(PG_FUNCTION_ARGS)
15751594}
15761595
15771596
1578- /* Determines the position of S2 in the bitstring S1 (1-based string).
1597+ /*
1598+ * Determines the position of S2 in the bitstring S1 (1-based string).
15791599 * If S2 does not appear in S1 this function returns 0.
15801600 * If S2 is of length 0 this function returns 1.
15811601 * Compatible in usage with POSITION() functions for other data types.