summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/include
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-11-08 20:37:52 +0000
committerBruce Momjian <bruce@momjian.us>2001-11-08 20:37:52 +0000
commit77e4fd889c0a0e374164c2b57cade1ab2384d3f3 (patch)
treeca23ee21fba96421dad466734321daeeea1c4beb /src/interfaces/ecpg/include
parente8192dc0d037d30281369259b31b32330609ad30 (diff)
downloadpostgresql-77e4fd889c0a0e374164c2b57cade1ab2384d3f3.tar.gz
Fix indenting for 'extern "C"' cases.
Diffstat (limited to 'src/interfaces/ecpg/include')
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h49
-rw-r--r--src/interfaces/ecpg/include/ecpgtype.h77
-rw-r--r--src/interfaces/ecpg/include/sqlca.h74
3 files changed, 99 insertions, 101 deletions
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index 7cd5d581a9..8c455ec58b 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -35,23 +35,23 @@ extern "C"
{
#endif
- void ECPGdebug(int, FILE *);
- bool ECPGstatus(int, const char *);
- bool ECPGsetcommit(int, const char *, const char *);
- bool ECPGsetconn(int, const char *);
- bool ECPGconnect(int, const char *, const char *, const char *, const char *, int);
- bool ECPGdo(int, const char *, char *,...);
- bool ECPGtrans(int, const char *, const char *);
- bool ECPGdisconnect(int, const char *);
- bool ECPGprepare(int, char *, char *);
- bool ECPGdeallocate(int, char *);
- bool ECPGdeallocate_all(int);
- char *ECPGprepared_statement(char *);
-
- void ECPGlog(const char *format,...);
-
- /* print an error message */
- void sqlprint(void);
+void ECPGdebug(int, FILE *);
+bool ECPGstatus(int, const char *);
+bool ECPGsetcommit(int, const char *, const char *);
+bool ECPGsetconn(int, const char *);
+bool ECPGconnect(int, const char *, const char *, const char *, const char *, int);
+bool ECPGdo(int, const char *, char *,...);
+bool ECPGtrans(int, const char *, const char *);
+bool ECPGdisconnect(int, const char *);
+bool ECPGprepare(int, char *, char *);
+bool ECPGdeallocate(int, char *);
+bool ECPGdeallocate_all(int);
+char *ECPGprepared_statement(char *);
+
+void ECPGlog(const char *format,...);
+
+ /* print an error message */
+void sqlprint(void);
/* define this for simplicity as well as compatibility */
@@ -59,16 +59,15 @@ extern "C"
/* dynamic SQL */
- bool ECPGdo_descriptor(int line, const char *connection,
- const char *descriptor, const char *query);
- bool ECPGdeallocate_desc(int line, const char *name);
- bool ECPGallocate_desc(int line, const char *name);
- void ECPGraise(int line, int code, const char *str);
- bool ECPGget_desc_header(int, char *, int *);
- bool ECPGget_desc(int, char *, int,...);
+bool ECPGdo_descriptor(int line, const char *connection,
+ const char *descriptor, const char *query);
+bool ECPGdeallocate_desc(int line, const char *name);
+bool ECPGallocate_desc(int line, const char *name);
+void ECPGraise(int line, int code, const char *str);
+bool ECPGget_desc_header(int, char *, int *);
+bool ECPGget_desc(int, char *, int,...);
#ifdef __cplusplus
}
-
#endif
diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h
index d8e2807bb1..29aedf49c6 100644
--- a/src/interfaces/ecpg/include/ecpgtype.h
+++ b/src/interfaces/ecpg/include/ecpgtype.h
@@ -32,49 +32,48 @@ extern "C"
{
#endif
- enum ECPGttype
- {
- ECPGt_char = 1, ECPGt_unsigned_char, ECPGt_short, ECPGt_unsigned_short,
- ECPGt_int, ECPGt_unsigned_int, ECPGt_long, ECPGt_unsigned_long,
- ECPGt_bool,
- ECPGt_float, ECPGt_double,
- ECPGt_varchar, ECPGt_varchar2,
- ECPGt_array,
- ECPGt_struct,
- ECPGt_union,
- ECPGt_char_variable,
- ECPGt_EOIT, /* End of insert types. */
- ECPGt_EORT, /* End of result types. */
- ECPGt_NO_INDICATOR, /* no indicator */
- ECPGt_long_long, ECPGt_unsigned_long_long,
- ECPGt_descriptor /* sql descriptor, no C variable */
- };
+enum ECPGttype
+{
+ ECPGt_char = 1, ECPGt_unsigned_char, ECPGt_short, ECPGt_unsigned_short,
+ ECPGt_int, ECPGt_unsigned_int, ECPGt_long, ECPGt_unsigned_long,
+ ECPGt_bool,
+ ECPGt_float, ECPGt_double,
+ ECPGt_varchar, ECPGt_varchar2,
+ ECPGt_array,
+ ECPGt_struct,
+ ECPGt_union,
+ ECPGt_char_variable,
+ ECPGt_EOIT, /* End of insert types. */
+ ECPGt_EORT, /* End of result types. */
+ ECPGt_NO_INDICATOR, /* no indicator */
+ ECPGt_long_long, ECPGt_unsigned_long_long,
+ ECPGt_descriptor /* sql descriptor, no C variable */
+};
- /* descriptor items */
- enum ECPGdtype
- {
- ECPGd_count = 1,
- ECPGd_data,
- ECPGd_di_code,
- ECPGd_di_precision,
- ECPGd_indicator,
- ECPGd_key_member,
- ECPGd_length,
- ECPGd_name,
- ECPGd_nullable,
- ECPGd_octet,
- ECPGd_precision,
- ECPGd_ret_length,
- ECPGd_ret_octet,
- ECPGd_scale,
- ECPGd_type,
- ECPGd_EODT, /* End of descriptor types. */
- ECPGd_cardinality
- };
+ /* descriptor items */
+enum ECPGdtype
+{
+ ECPGd_count = 1,
+ ECPGd_data,
+ ECPGd_di_code,
+ ECPGd_di_precision,
+ ECPGd_indicator,
+ ECPGd_key_member,
+ ECPGd_length,
+ ECPGd_name,
+ ECPGd_nullable,
+ ECPGd_octet,
+ ECPGd_precision,
+ ECPGd_ret_length,
+ ECPGd_ret_octet,
+ ECPGd_scale,
+ ECPGd_type,
+ ECPGd_EODT, /* End of descriptor types. */
+ ECPGd_cardinality
+};
#define IS_SIMPLE_TYPE(type) (((type) >= ECPGt_char && (type) <= ECPGt_varchar2) || ((type)>=ECPGt_long_long && (type) <= ECPGt_unsigned_long_long))
#ifdef __cplusplus
}
-
#endif
diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h
index e3abdf7878..63296348de 100644
--- a/src/interfaces/ecpg/include/sqlca.h
+++ b/src/interfaces/ecpg/include/sqlca.h
@@ -16,44 +16,44 @@ extern "C"
{
#endif
- struct sqlca
+struct sqlca
+{
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
{
- char sqlcaid[8];
- long sqlabc;
- long sqlcode;
- struct
- {
- int sqlerrml;
- char sqlerrmc[SQLERRMC_LEN];
- } sqlerrm;
- char sqlerrp[8];
- long sqlerrd[6];
- /* Element 0: empty */
- /* 1: OID of processed tuple if applicable */
- /* 2: number of rows processed */
- /* after an INSERT, UPDATE or */
- /* DELETE statement */
- /* 3: empty */
- /* 4: empty */
- /* 5: empty */
- char sqlwarn[8];
- /* Element 0: set to 'W' if at least one other is 'W' */
- /* 1: if 'W' at least one character string */
- /* value was truncated when it was */
- /* stored into a host variable. */
-
- /*
- * 2: if 'W' a (hopefully) non-fatal notice occured
- */ /* 3: empty */
- /* 4: empty */
- /* 5: empty */
- /* 6: empty */
- /* 7: empty */
-
- char sqlext[8];
- };
-
- extern DLLIMPORT struct sqlca sqlca;
+ int sqlerrml;
+ char sqlerrmc[SQLERRMC_LEN];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: OID of processed tuple if applicable */
+ /* 2: number of rows processed */
+ /* after an INSERT, UPDATE or */
+ /* DELETE statement */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ char sqlwarn[8];
+ /* Element 0: set to 'W' if at least one other is 'W' */
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+
+ /*
+ * 2: if 'W' a (hopefully) non-fatal notice occured
+ */ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlext[8];
+};
+
+extern DLLIMPORT struct sqlca sqlca;
#ifdef __cplusplus