1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-27 22:56:53 +03:00

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.
This commit is contained in:
Bruce Momjian 2010-02-26 17:07:55 +00:00
parent 98c356c8ad
commit 2cc6ff45f8
4 changed files with 44 additions and 41 deletions

View File

@ -4,13 +4,15 @@
#ifdef _ECPG_INFORMIX_H #ifdef _ECPG_INFORMIX_H
#include "sqlda-compat.h" #include "sqlda-compat.h"
typedef struct sqlvar_compat sqlvar_t; typedef struct sqlvar_compat sqlvar_t;
typedef struct sqlda_compat sqlda_t; typedef struct sqlda_compat sqlda_t;
#else #else
#include "sqlda-native.h" #include "sqlda-native.h"
typedef struct sqlvar_struct sqlvar_t; typedef struct sqlvar_struct sqlvar_t;
typedef struct sqlda_struct sqlda_t; typedef struct sqlda_struct sqlda_t;
#endif #endif
#endif /* ECPG_SQLDA_H */ #endif /* ECPG_SQLDA_H */

View File

@ -32,26 +32,26 @@
/* /*
* Values used in sqlda->sqlvar[i]->sqltype * Values used in sqlda->sqlvar[i]->sqltype
*/ */
#define SQLCHAR ECPGt_char #define SQLCHAR ECPGt_char
#define SQLSMINT ECPGt_short #define SQLSMINT ECPGt_short
#define SQLINT ECPGt_int #define SQLINT ECPGt_int
#define SQLFLOAT ECPGt_double #define SQLFLOAT ECPGt_double
#define SQLSMFLOAT ECPGt_float #define SQLSMFLOAT ECPGt_float
#define SQLDECIMAL ECPGt_decimal #define SQLDECIMAL ECPGt_decimal
#define SQLSERIAL ECPGt_int #define SQLSERIAL ECPGt_int
#define SQLDATE ECPGt_date #define SQLDATE ECPGt_date
#define SQLDTIME ECPGt_timestamp #define SQLDTIME ECPGt_timestamp
#define SQLTEXT ECPGt_char #define SQLTEXT ECPGt_char
#define SQLVCHAR ECPGt_char #define SQLVCHAR ECPGt_char
#define SQLINTERVAL ECPGt_interval #define SQLINTERVAL ECPGt_interval
#define SQLNCHAR ECPGt_char #define SQLNCHAR ECPGt_char
#define SQLNVCHAR ECPGt_char #define SQLNVCHAR ECPGt_char
#ifdef HAVE_LONG_LONG_INT_64 #ifdef HAVE_LONG_LONG_INT_64
#define SQLINT8 ECPGt_long_long #define SQLINT8 ECPGt_long_long
#define SQLSERIAL8 ECPGt_long_long #define SQLSERIAL8 ECPGt_long_long
#else #else
#define SQLINT8 ECPGt_long #define SQLINT8 ECPGt_long
#define SQLSERIAL8 ECPGt_long #define SQLSERIAL8 ECPGt_long
#endif #endif
#endif /* ndef ECPG_SQLTYPES_H */ #endif /* ndef ECPG_SQLTYPES_H */

View File

@ -1,20 +1,18 @@
struct mytype struct mytype {
{ int id;
int id; char t[64];
char t[64]; double d1; /* dec_t */
double d1; /* dec_t */ double d2;
double d2; char c[30];
char c[30];
}; };
typedef struct mytype MYTYPE; typedef struct mytype MYTYPE;
struct mynulltype struct mynulltype {
{ int id;
int id; int t;
int t; int d1;
int d1; int d2;
int d2; int c;
int c;
}; };
typedef struct mynulltype MYNULLTYPE; typedef struct mynulltype MYNULLTYPE;

View File

@ -1,4 +1,4 @@
$PostgreSQL: pgsql/src/tools/pgindent/README,v 1.37 2010/02/26 15:57:34 momjian Exp $ $PostgreSQL: pgsql/src/tools/pgindent/README,v 1.38 2010/02/26 17:07:55 momjian Exp $
pgindent pgindent
======== ========
@ -20,6 +20,8 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and
find . -name '*.[ch]' -type f -print | find . -name '*.[ch]' -type f -print |
egrep -v '/s_lock.h|/ecpg/test/expected/|/snowball/libstemmer/' | egrep -v '/s_lock.h|/ecpg/test/expected/|/snowball/libstemmer/' |
egrep -v '/ecpg/include/(sqlda|sqltypes)\.h$' |
egrep -v '/ecpg/include/preproc/struct\.h$' |
xargs -n100 pgindent src/tools/pgindent/typedefs.list xargs -n100 pgindent src/tools/pgindent/typedefs.list
5) Remove any files that generate errors. 5) Remove any files that generate errors.
@ -44,13 +46,14 @@ Notes about excluded files:
src/include/storage/s_lock.h is excluded because it contains assembly code src/include/storage/s_lock.h is excluded because it contains assembly code
that pgindent tends to mess up. that pgindent tends to mess up.
src/interfaces/ecpg/test/expected/ is excluded to avoid breaking the ecpg
regression tests.
src/include/snowball/libstemmer/ and src/backend/snowball/libstemmer/ src/include/snowball/libstemmer/ and src/backend/snowball/libstemmer/
are excluded because those files are imported from an external project, are excluded because those files are imported from an external project,
not maintained locally, and are machine-generated anyway. not maintained locally, and are machine-generated anyway.
src/interfaces/ecpg/test/expected/ is excluded to avoid breaking the ecpg
regression tests. Several *.h files are included in regression output so
should not be changed.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
Obsolete typedef list creation instructions: Obsolete typedef list creation instructions: