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

Commit 2cc6ff4

Browse files
committed
Revert pgindent changes to ecpg include files that are part of ecpg
regession test output, and update pgindent script to avoid them in the future.
1 parent 98c356c commit 2cc6ff4

File tree

4 files changed

+44
-41
lines changed

4 files changed

+44
-41
lines changed

src/interfaces/ecpg/include/sqlda.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
#ifdef _ECPG_INFORMIX_H
55

66
#include "sqlda-compat.h"
7-
typedef struct sqlvar_compat sqlvar_t;
8-
typedef struct sqlda_compat sqlda_t;
7+
typedef struct sqlvar_compat sqlvar_t;
8+
typedef struct sqlda_compat sqlda_t;
9+
910
#else
1011

1112
#include "sqlda-native.h"
12-
typedef struct sqlvar_struct sqlvar_t;
13-
typedef struct sqlda_struct sqlda_t;
13+
typedef struct sqlvar_struct sqlvar_t;
14+
typedef struct sqlda_struct sqlda_t;
15+
1416
#endif
1517

16-
#endif /* ECPG_SQLDA_H */
18+
#endif /* ECPG_SQLDA_H */

src/interfaces/ecpg/include/sqltypes.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,26 @@
3232
/*
3333
* Values used in sqlda->sqlvar[i]->sqltype
3434
*/
35-
#define SQLCHAR ECPGt_char
36-
#define SQLSMINT ECPGt_short
37-
#define SQLINT ECPGt_int
38-
#define SQLFLOAT ECPGt_double
39-
#define SQLSMFLOAT ECPGt_float
40-
#define SQLDECIMAL ECPGt_decimal
41-
#define SQLSERIAL ECPGt_int
42-
#define SQLDATE ECPGt_date
43-
#define SQLDTIME ECPGt_timestamp
44-
#define SQLTEXT ECPGt_char
45-
#define SQLVCHAR ECPGt_char
46-
#define SQLINTERVAL ECPGt_interval
47-
#define SQLNCHAR ECPGt_char
48-
#define SQLNVCHAR ECPGt_char
35+
#define SQLCHAR ECPGt_char
36+
#define SQLSMINT ECPGt_short
37+
#define SQLINT ECPGt_int
38+
#define SQLFLOAT ECPGt_double
39+
#define SQLSMFLOAT ECPGt_float
40+
#define SQLDECIMAL ECPGt_decimal
41+
#define SQLSERIAL ECPGt_int
42+
#define SQLDATE ECPGt_date
43+
#define SQLDTIME ECPGt_timestamp
44+
#define SQLTEXT ECPGt_char
45+
#define SQLVCHAR ECPGt_char
46+
#define SQLINTERVAL ECPGt_interval
47+
#define SQLNCHAR ECPGt_char
48+
#define SQLNVCHAR ECPGt_char
4949
#ifdef HAVE_LONG_LONG_INT_64
50-
#define SQLINT8 ECPGt_long_long
51-
#define SQLSERIAL8 ECPGt_long_long
50+
#define SQLINT8 ECPGt_long_long
51+
#define SQLSERIAL8 ECPGt_long_long
5252
#else
53-
#define SQLINT8 ECPGt_long
54-
#define SQLSERIAL8 ECPGt_long
53+
#define SQLINT8 ECPGt_long
54+
#define SQLSERIAL8 ECPGt_long
5555
#endif
5656

5757
#endif /* ndef ECPG_SQLTYPES_H */
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11

2-
struct mytype
3-
{
4-
int id;
5-
char t[64];
6-
double d1; /* dec_t */
7-
double d2;
8-
char c[30];
2+
struct mytype {
3+
int id;
4+
char t[64];
5+
double d1; /* dec_t */
6+
double d2;
7+
char c[30];
98
};
109
typedef struct mytype MYTYPE;
1110

12-
struct mynulltype
13-
{
14-
int id;
15-
int t;
16-
int d1;
17-
int d2;
18-
int c;
11+
struct mynulltype {
12+
int id;
13+
int t;
14+
int d1;
15+
int d2;
16+
int c;
1917
};
2018
typedef struct mynulltype MYNULLTYPE;

src/tools/pgindent/README

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$PostgreSQL: pgsql/src/tools/pgindent/README,v 1.37 2010/02/26 15:57:34 momjian Exp $
1+
$PostgreSQL: pgsql/src/tools/pgindent/README,v 1.38 2010/02/26 17:07:55 momjian Exp $
22

33
pgindent
44
========
@@ -20,6 +20,8 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and
2020

2121
find . -name '*.[ch]' -type f -print |
2222
egrep -v '/s_lock.h|/ecpg/test/expected/|/snowball/libstemmer/' |
23+
egrep -v '/ecpg/include/(sqlda|sqltypes)\.h$' |
24+
egrep -v '/ecpg/include/preproc/struct\.h$' |
2325
xargs -n100 pgindent src/tools/pgindent/typedefs.list
2426

2527
5) Remove any files that generate errors.
@@ -44,13 +46,14 @@ Notes about excluded files:
4446
src/include/storage/s_lock.h is excluded because it contains assembly code
4547
that pgindent tends to mess up.
4648

47-
src/interfaces/ecpg/test/expected/ is excluded to avoid breaking the ecpg
48-
regression tests.
49-
5049
src/include/snowball/libstemmer/ and src/backend/snowball/libstemmer/
5150
are excluded because those files are imported from an external project,
5251
not maintained locally, and are machine-generated anyway.
5352

53+
src/interfaces/ecpg/test/expected/ is excluded to avoid breaking the ecpg
54+
regression tests. Several *.h files are included in regression output so
55+
should not be changed.
56+
5457
---------------------------------------------------------------------------
5558

5659
Obsolete typedef list creation instructions:

0 commit comments

Comments
 (0)