Fix for 'extern "C"' indenting

Поиск
Список
Период
Сортировка
Искать

Fix for 'extern "C"' indenting

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Tom found a problem with indenting of "extern C" code blocks.  I thought
I had fixed it earlier, but obviously not.

Attached is a patch which is a run of an improved pgindent over several
include files that contained 'extern "C"' blocks.

Do people want this applied or should we just live with a ugly indenting
of a few C files for 7.2?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: src/backend/port/dynloader/aix.h
===================================================================
RCS file: /cvsroot/pgsql/src/backend/port/dynloader/aix.h,v
retrieving revision 1.9
diff -c -r1.9 aix.h
*** src/backend/port/dynloader/aix.h	2001/11/05 17:46:27	1.9
--- src/backend/port/dynloader/aix.h	2001/11/07 22:17:17
***************
*** 31,53 ****
   * To be able to intialize, a library may provide a dl_info structure
   * that contains functions to be called to initialize and terminate.
   */
! 	struct dl_info
! 	{
! 		void		(*init) (void);
! 		void		(*fini) (void);
! 	};
  
  #if __STDC__ || defined(_IBMR2)
! 	void	   *dlopen(const char *path, int mode);
! 	void	   *dlsym(void *handle, const char *symbol);
! 	char	   *dlerror(void);
! 	int			dlclose(void *handle);
  
  #else
! 	void	   *dlopen();
! 	void	   *dlsym();
! 	char	   *dlerror();
! 	int			dlclose();
  #endif
  
  #ifdef __cplusplus
--- 31,53 ----
   * To be able to intialize, a library may provide a dl_info structure
   * that contains functions to be called to initialize and terminate.
   */
! struct dl_info
! {
! 	void		(*init) (void);
! 	void		(*fini) (void);
! };
  
  #if __STDC__ || defined(_IBMR2)
! void	   *dlopen(const char *path, int mode);
! void	   *dlsym(void *handle, const char *symbol);
! char	   *dlerror(void);
! int			dlclose(void *handle);
  
  #else
! void	   *dlopen();
! void	   *dlsym();
! char	   *dlerror();
! int			dlclose();
  #endif
  
  #ifdef __cplusplus
Index: src/backend/port/qnx4/sem.h
===================================================================
RCS file: /cvsroot/pgsql/src/backend/port/qnx4/sem.h,v
retrieving revision 1.6
diff -c -r1.6 sem.h
*** src/backend/port/qnx4/sem.h	2001/11/05 17:46:27	1.6
--- src/backend/port/qnx4/sem.h	2001/11/07 22:17:18
***************
*** 38,65 ****
   *	There is one semaphore structure for each semaphore in the system.
   */
  
! 	struct sem
! 	{
! 		ushort_t	semval;		/* semaphore text map address	*/
! 		pid_t		sempid;		/* pid of last operation	*/
! 		ushort_t	semncnt;	/* # awaiting semval > cval */
! 		ushort_t	semzcnt;	/* # awaiting semval = 0	*/
! 	};
  
  /*
   * User semaphore template for semop system calls.
   */
  
! 	struct sembuf
! 	{
! 		ushort_t	sem_num;	/* semaphore #			*/
! 		short		sem_op;		/* semaphore operation		*/
! 		short		sem_flg;	/* operation flags		*/
! 	};
  
! 	extern int	semctl(int semid, int semnum, int cmd, /* ... */ union semun arg);
! 	extern int	semget(key_t key, int nsems, int semflg);
! 	extern int	semop(int semid, struct sembuf * sops, size_t nsops);
  
  #ifdef __cplusplus
  }
--- 38,65 ----
   *	There is one semaphore structure for each semaphore in the system.
   */
  
! struct sem
! {
! 	ushort_t	semval;			/* semaphore text map address	*/
! 	pid_t		sempid;			/* pid of last operation	*/
! 	ushort_t	semncnt;		/* # awaiting semval > cval */
! 	ushort_t	semzcnt;		/* # awaiting semval = 0	*/
! };
  
  /*
   * User semaphore template for semop system calls.
   */
  
! struct sembuf
! {
! 	ushort_t	sem_num;		/* semaphore #			*/
! 	short		sem_op;			/* semaphore operation		*/
! 	short		sem_flg;		/* operation flags		*/
! };
  
! extern int	semctl(int semid, int semnum, int cmd, /* ... */ union semun arg);
! extern int	semget(key_t key, int nsems, int semflg);
! extern int	semop(int semid, struct sembuf * sops, size_t nsops);
  
  #ifdef __cplusplus
  }
Index: src/backend/port/qnx4/shm.h
===================================================================
RCS file: /cvsroot/pgsql/src/backend/port/qnx4/shm.h,v
retrieving revision 1.6
diff -c -r1.6 shm.h
*** src/backend/port/qnx4/shm.h	2001/11/05 17:46:27	1.6
--- src/backend/port/qnx4/shm.h	2001/11/07 22:17:18
***************
*** 25,40 ****
  #define SHM_R	0400			/* read permission */
  #define SHM_W	0200			/* write permission */
  
! 	struct shmid_ds
! 	{
! 		int			dummy;
! 		int			shm_nattch;
! 	};
  
! 	extern void *shmat(int shmid, const void *shmaddr, int shmflg);
! 	extern int	shmdt(const void *addr);
! 	extern int	shmctl(int shmid, int cmd, struct shmid_ds * buf);
! 	extern int	shmget(key_t key, size_t size, int flags);
  
  #ifdef	__cplusplus
  }
--- 25,40 ----
  #define SHM_R	0400			/* read permission */
  #define SHM_W	0200			/* write permission */
  
! struct shmid_ds
! {
! 	int			dummy;
! 	int			shm_nattch;
! };
  
! extern void *shmat(int shmid, const void *shmaddr, int shmflg);
! extern int	shmdt(const void *addr);
! extern int	shmctl(int shmid, int cmd, struct shmid_ds * buf);
! extern int	shmget(key_t key, size_t size, int flags);
  
  #ifdef	__cplusplus
  }
Index: src/backend/storage/lmgr/proc.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v
retrieving revision 1.115
diff -c -r1.115 proc.c
*** src/backend/storage/lmgr/proc.c	2001/11/06 00:38:26	1.115
--- src/backend/storage/lmgr/proc.c	2001/11/07 22:17:34
***************
*** 125,131 ****
  	/*
  	 * Compute size for ProcGlobal structure.  Note we need one more sema
  	 * besides those used for regular backends; this is accounted for in
! 	 * the PROC_SEM_MAP_ENTRIES macro.  (We do it that way so that other
  	 * modules that use PROC_SEM_MAP_ENTRIES(maxBackends) to size data
  	 * structures don't have to know about this explicitly.)
  	 */
--- 125,131 ----
  	/*
  	 * Compute size for ProcGlobal structure.  Note we need one more sema
  	 * besides those used for regular backends; this is accounted for in
! 	 * the PROC_SEM_MAP_ENTRIES macro.	(We do it that way so that other
  	 * modules that use PROC_SEM_MAP_ENTRIES(maxBackends) to size data
  	 * structures don't have to know about this explicitly.)
  	 */
Index: src/backend/tioga/tgRecipe.h
===================================================================
RCS file: /cvsroot/pgsql/src/backend/tioga/tgRecipe.h,v
retrieving revision 1.21
diff -c -r1.21 tgRecipe.h
*** src/backend/tioga/tgRecipe.h	2001/11/05 17:46:28	1.21
--- src/backend/tioga/tgRecipe.h	2001/11/07 22:17:38
***************
*** 31,36 ****
--- 31,37 ----
  
  								 *
  								 *
+ 								 *
  								 * geo-decls.h */
  #endif   /* TIOGA_FRONTEND */
  
Index: src/include/executor/spi.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/executor/spi.h,v
retrieving revision 1.32
diff -c -r1.32 spi.h
*** src/include/executor/spi.h	2001/11/05 19:41:56	1.32
--- src/include/executor/spi.h	2001/11/07 22:18:39
***************
*** 90,96 ****
  extern HeapTuple SPI_copytuple(HeapTuple tuple);
  extern TupleDesc SPI_copytupledesc(TupleDesc tupdesc);
  extern TupleTableSlot *SPI_copytupleintoslot(HeapTuple tuple,
! 											 TupleDesc tupdesc);
  extern HeapTuple SPI_modifytuple(Relation rel, HeapTuple tuple, int natts,
  				int *attnum, Datum *Values, char *Nulls);
  extern int	SPI_fnumber(TupleDesc tupdesc, char *fname);
--- 90,96 ----
  extern HeapTuple SPI_copytuple(HeapTuple tuple);
  extern TupleDesc SPI_copytupledesc(TupleDesc tupdesc);
  extern TupleTableSlot *SPI_copytupleintoslot(HeapTuple tuple,
! 					  TupleDesc tupdesc);
  extern HeapTuple SPI_modifytuple(Relation rel, HeapTuple tuple, int natts,
  				int *attnum, Datum *Values, char *Nulls);
  extern int	SPI_fnumber(TupleDesc tupdesc, char *fname);
Index: src/include/port/darwin/sem.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/port/darwin/sem.h,v
retrieving revision 1.5
diff -c -r1.5 sem.h
*** src/include/port/darwin/sem.h	2001/11/05 17:46:35	1.5
--- src/include/port/darwin/sem.h	2001/11/07 22:18:46
***************
*** 44,71 ****
   *	There is one semaphore structure for each semaphore in the system.
   */
  
! 	struct sem
! 	{
! 		ushort_t	semval;		/* semaphore text map address	*/
! 		pid_t		sempid;		/* pid of last operation	*/
! 		ushort_t	semncnt;	/* # awaiting semval > cval */
! 		ushort_t	semzcnt;	/* # awaiting semval = 0	*/
! 	};
  
  /*
   * User semaphore template for semop system calls.
   */
  
! 	struct sembuf
! 	{
! 		ushort_t	sem_num;	/* semaphore #			*/
! 		short		sem_op;		/* semaphore operation		*/
! 		short		sem_flg;	/* operation flags		*/
! 	};
  
! 	extern int	semctl(int semid, int semnum, int cmd, /* ... */ union semun arg);
! 	extern int	semget(key_t key, int nsems, int semflg);
! 	extern int	semop(int semid, struct sembuf * sops, size_t nsops);
  
  #ifdef __cplusplus
  }
--- 44,71 ----
   *	There is one semaphore structure for each semaphore in the system.
   */
  
! struct sem
! {
! 	ushort_t	semval;			/* semaphore text map address	*/
! 	pid_t		sempid;			/* pid of last operation	*/
! 	ushort_t	semncnt;		/* # awaiting semval > cval */
! 	ushort_t	semzcnt;		/* # awaiting semval = 0	*/
! };
  
  /*
   * User semaphore template for semop system calls.
   */
  
! struct sembuf
! {
! 	ushort_t	sem_num;		/* semaphore #			*/
! 	short		sem_op;			/* semaphore operation		*/
! 	short		sem_flg;		/* operation flags		*/
! };
  
! extern int	semctl(int semid, int semnum, int cmd, /* ... */ union semun arg);
! extern int	semget(key_t key, int nsems, int semflg);
! extern int	semop(int semid, struct sembuf * sops, size_t nsops);
  
  #ifdef __cplusplus
  }
Index: src/interfaces/ecpg/include/ecpglib.h
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/ecpg/include/ecpglib.h,v
retrieving revision 1.40
diff -c -r1.40 ecpglib.h
*** src/interfaces/ecpg/include/ecpglib.h	2001/11/05 17:46:37	1.40
--- src/interfaces/ecpg/include/ecpglib.h	2001/11/07 22:18:53
***************
*** 35,57 ****
  {
  #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);
  
  /* define this for simplicity as well as compatibility */
  
--- 35,57 ----
  {
  #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);
  
  /* define this for simplicity as well as compatibility */
  
***************
*** 59,71 ****
  
  /* 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,...);
  
  
  #ifdef __cplusplus
--- 59,71 ----
  
  /* 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,...);
  
  
  #ifdef __cplusplus
Index: src/interfaces/ecpg/include/ecpgtype.h
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/ecpg/include/ecpgtype.h,v
retrieving revision 1.23
diff -c -r1.23 ecpgtype.h
*** src/interfaces/ecpg/include/ecpgtype.h	2001/10/28 06:26:11	1.23
--- src/interfaces/ecpg/include/ecpgtype.h	2001/11/07 22:18:53
***************
*** 32,76 ****
  {
  #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 */
! 	};
  
! 	/* 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))
  
--- 32,76 ----
  {
  #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 */
! };
  
!  /* 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))
  
Index: src/interfaces/ecpg/include/sqlca.h
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/ecpg/include/sqlca.h,v
retrieving revision 1.20
diff -c -r1.20 sqlca.h
*** src/interfaces/ecpg/include/sqlca.h	2001/11/05 17:46:37	1.20
--- src/interfaces/ecpg/include/sqlca.h	2001/11/07 22:18:53
***************
*** 16,59 ****
  {
  #endif
  
! 	struct sqlca
  	{
! 		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;
  
  
  #ifdef __cplusplus
--- 16,59 ----
  {
  #endif
  
! struct sqlca
! {
! 	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;
  
  
  #ifdef __cplusplus
Index: src/interfaces/libpq/libpq-fe.h
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpq-fe.h,v
retrieving revision 1.79
diff -c -r1.79 libpq-fe.h
*** src/interfaces/libpq/libpq-fe.h	2001/11/05 17:46:37	1.79
--- src/interfaces/libpq/libpq-fe.h	2001/11/07 22:19:03
***************
*** 35,102 ****
  
  /* Application-visible enum types */
  
! 	typedef enum
! 	{
! 		/*
! 		 * Although you may decide to change this list in some way, values
! 		 * which become unused should never be removed, nor should
! 		 * constants be redefined - that would break compatibility with
! 		 * existing code.
! 		 */
! 		CONNECTION_OK,
! 		CONNECTION_BAD,
! 		/* Non-blocking mode only below here */
! 
! 		/*
! 		 * The existence of these should never be relied upon - they
! 		 * should only be used for user feedback or similar purposes.
! 		 */
! 		CONNECTION_STARTED,		/* Waiting for connection to be made.  */
! 		CONNECTION_MADE,		/* Connection OK; waiting to send.	   */
! 		CONNECTION_AWAITING_RESPONSE,	/* Waiting for a response from the
  										 * postmaster.		  */
! 		CONNECTION_AUTH_OK,		/* Received authentication; waiting for
  								 * backend startup. */
! 		CONNECTION_SETENV		/* Negotiating environment.    */
! 	} ConnStatusType;
! 
! 	typedef enum
! 	{
! 		PGRES_POLLING_FAILED = 0,
! 		PGRES_POLLING_READING,	/* These two indicate that one may	  */
! 		PGRES_POLLING_WRITING,	/* use select before polling again.   */
! 		PGRES_POLLING_OK,
! 		PGRES_POLLING_ACTIVE	/* Can call poll function immediately. */
! 	} PostgresPollingStatusType;
  
! 	typedef enum
! 	{
! 		PGRES_EMPTY_QUERY = 0,
! 		PGRES_COMMAND_OK,		/* a query command that doesn't return
  								 * anything was executed properly by the
  								 * backend */
! 		PGRES_TUPLES_OK,		/* a query command that returns tuples was
  								 * executed properly by the backend,
  								 * PGresult contains the result tuples */
! 		PGRES_COPY_OUT,			/* Copy Out data transfer in progress */
! 		PGRES_COPY_IN,			/* Copy In data transfer in progress */
! 		PGRES_BAD_RESPONSE,		/* an unexpected response was recv'd from
  								 * the backend */
! 		PGRES_NONFATAL_ERROR,
! 		PGRES_FATAL_ERROR
! 	} ExecStatusType;
  
  /* PGconn encapsulates a connection to the backend.
   * The contents of this struct are not supposed to be known to applications.
   */
! 	typedef struct pg_conn PGconn;
  
  /* PGresult encapsulates the result of a query (or more precisely, of a single
   * SQL command --- a query string given to PQsendQuery can contain multiple
   * commands and thus return multiple PGresult objects).
   * The contents of this struct are not supposed to be known to applications.
   */
! 	typedef struct pg_result PGresult;
  
  /* PGnotify represents the occurrence of a NOTIFY message.
   * Ideally this would be an opaque typedef, but it's so simple that it's
--- 35,101 ----
  
  /* Application-visible enum types */
  
! typedef enum
! {
! 	/*
! 	 * Although you may decide to change this list in some way, values
! 	 * which become unused should never be removed, nor should constants
! 	 * be redefined - that would break compatibility with existing code.
! 	 */
! 	CONNECTION_OK,
! 	CONNECTION_BAD,
! 	/* Non-blocking mode only below here */
! 
! 	/*
! 	 * The existence of these should never be relied upon - they should
! 	 * only be used for user feedback or similar purposes.
! 	 */
! 	CONNECTION_STARTED,			/* Waiting for connection to be made.  */
! 	CONNECTION_MADE,			/* Connection OK; waiting to send.	   */
! 	CONNECTION_AWAITING_RESPONSE,		/* Waiting for a response from the
  										 * postmaster.		  */
! 	CONNECTION_AUTH_OK,			/* Received authentication; waiting for
  								 * backend startup. */
! 	CONNECTION_SETENV			/* Negotiating environment.    */
! } ConnStatusType;
  
! typedef enum
! {
! 	PGRES_POLLING_FAILED = 0,
! 	PGRES_POLLING_READING,		/* These two indicate that one may	  */
! 	PGRES_POLLING_WRITING,		/* use select before polling again.   */
! 	PGRES_POLLING_OK,
! 	PGRES_POLLING_ACTIVE		/* Can call poll function immediately. */
! } PostgresPollingStatusType;
! 
! typedef enum
! {
! 	PGRES_EMPTY_QUERY = 0,
! 	PGRES_COMMAND_OK,			/* a query command that doesn't return
  								 * anything was executed properly by the
  								 * backend */
! 	PGRES_TUPLES_OK,			/* a query command that returns tuples was
  								 * executed properly by the backend,
  								 * PGresult contains the result tuples */
! 	PGRES_COPY_OUT,				/* Copy Out data transfer in progress */
! 	PGRES_COPY_IN,				/* Copy In data transfer in progress */
! 	PGRES_BAD_RESPONSE,			/* an unexpected response was recv'd from
  								 * the backend */
! 	PGRES_NONFATAL_ERROR,
! 	PGRES_FATAL_ERROR
! } ExecStatusType;
  
  /* PGconn encapsulates a connection to the backend.
   * The contents of this struct are not supposed to be known to applications.
   */
! typedef struct pg_conn PGconn;
  
  /* PGresult encapsulates the result of a query (or more precisely, of a single
   * SQL command --- a query string given to PQsendQuery can contain multiple
   * commands and thus return multiple PGresult objects).
   * The contents of this struct are not supposed to be known to applications.
   */
! typedef struct pg_result PGresult;
  
  /* PGnotify represents the occurrence of a NOTIFY message.
   * Ideally this would be an opaque typedef, but it's so simple that it's
***************
*** 104,138 ****
   * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
   * whereas in earlier versions it was always your own backend's PID.
   */
! 	typedef struct pgNotify
! 	{
! 		char		relname[NAMEDATALEN];		/* name of relation
! 												 * containing data */
! 		int			be_pid;		/* process id of backend */
! 	} PGnotify;
  
  /* PQnoticeProcessor is the function type for the notice-message callback.
   */
! 	typedef void (*PQnoticeProcessor) (void *arg, const char *message);
  
  /* Print options for PQprint() */
! 	typedef char pqbool;
  
! 	typedef struct _PQprintOpt
! 	{
! 		pqbool		header;		/* print output field headings and row
  								 * count */
! 		pqbool		align;		/* fill align the fields */
! 		pqbool		standard;	/* old brain dead format */
! 		pqbool		html3;		/* output html tables */
! 		pqbool		expanded;	/* expand tables */
! 		pqbool		pager;		/* use pager for output if needed */
! 		char	   *fieldSep;	/* field separator */
! 		char	   *tableOpt;	/* insert to HTML  */
! 		char	   *caption;	/* HTML 
*/ ! char **fieldName; /* null terminated array of repalcement * field names */ ! } PQprintOpt; /* ---------------- * Structure for the conninfo parameter definitions returned by PQconndefaults --- 103,137 ---- * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's, * whereas in earlier versions it was always your own backend's PID. */ ! typedef struct pgNotify ! { ! char relname[NAMEDATALEN]; /* name of relation containing ! * data */ ! int be_pid; /* process id of backend */ ! } PGnotify; /* PQnoticeProcessor is the function type for the notice-message callback. */ ! typedef void (*PQnoticeProcessor) (void *arg, const char *message); /* Print options for PQprint() */ ! typedef char pqbool; ! typedef struct _PQprintOpt ! { ! pqbool header; /* print output field headings and row * count */ ! pqbool align; /* fill align the fields */ ! pqbool standard; /* old brain dead format */ ! pqbool html3; /* output html tables */ ! pqbool expanded; /* expand tables */ ! pqbool pager; /* use pager for output if needed */ ! char *fieldSep; /* field separator */ ! char *tableOpt; /* insert to HTML */ ! char *caption; /* HTML
*/ ! char **fieldName; /* null terminated array of repalcement * field names */ ! } PQprintOpt; /* ---------------- * Structure for the conninfo parameter definitions returned by PQconndefaults *************** *** 142,176 **** * will release both the val strings and the PQconninfoOption array itself. * ---------------- */ ! typedef struct _PQconninfoOption ! { ! char *keyword; /* The keyword of the option */ ! char *envvar; /* Fallback environment variable name */ ! char *compiled; /* Fallback compiled in default value */ ! char *val; /* Option's current value, or NULL */ ! char *label; /* Label for field in connect dialog */ ! char *dispchar; /* Character to display for this field in * a connect dialog. Values are: "" * Display entered value as is "*" * Password field - hide value "D" Debug * option - don't show by default */ ! int dispsize; /* Field size in characters for dialog */ ! } PQconninfoOption; /* ---------------- * PQArgBlock -- structure for PQfn() arguments * ---------------- */ ! typedef struct { ! int len; ! int isint; ! union ! { ! int *ptr; /* can't use void (dec compiler barfs) */ ! int integer; ! } u; ! } PQArgBlock; /* ---------------- * Exported functions of libpq --- 141,175 ---- * will release both the val strings and the PQconninfoOption array itself. * ---------------- */ ! typedef struct _PQconninfoOption ! { ! char *keyword; /* The keyword of the option */ ! char *envvar; /* Fallback environment variable name */ ! char *compiled; /* Fallback compiled in default value */ ! char *val; /* Option's current value, or NULL */ ! char *label; /* Label for field in connect dialog */ ! char *dispchar; /* Character to display for this field in * a connect dialog. Values are: "" * Display entered value as is "*" * Password field - hide value "D" Debug * option - don't show by default */ ! int dispsize; /* Field size in characters for dialog */ ! } PQconninfoOption; /* ---------------- * PQArgBlock -- structure for PQfn() arguments * ---------------- */ ! typedef struct ! { ! int len; ! int isint; ! union { ! int *ptr; /* can't use void (dec compiler barfs) */ ! int integer; ! } u; ! } PQArgBlock; /* ---------------- * Exported functions of libpq *************** *** 181,375 **** /* make a new client connection to the backend */ /* Asynchronous (non-blocking) */ ! extern PGconn *PQconnectStart(const char *conninfo); ! extern PostgresPollingStatusType PQconnectPoll(PGconn *conn); /* Synchronous (blocking) */ ! extern PGconn *PQconnectdb(const char *conninfo); ! extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport, ! const char *pgoptions, const char *pgtty, ! const char *dbName, ! const char *login, const char *pwd); #define PQsetdb(M_PGHOST,M_PGPORT,M_PGOPT,M_PGTTY,M_DBNAME) \ PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL) /* close the current connection and free the PGconn data structure */ ! extern void PQfinish(PGconn *conn); /* get info about connection options known to PQconnectdb */ ! extern PQconninfoOption *PQconndefaults(void); /* free the data structure returned by PQconndefaults() */ ! extern void PQconninfoFree(PQconninfoOption *connOptions); /* * close the current connection and restablish a new one with the same * parameters */ /* Asynchronous (non-blocking) */ ! extern int PQresetStart(PGconn *conn); ! extern PostgresPollingStatusType PQresetPoll(PGconn *conn); /* Synchronous (blocking) */ ! extern void PQreset(PGconn *conn); /* issue a cancel request */ ! extern int PQrequestCancel(PGconn *conn); /* Accessor functions for PGconn objects */ ! extern char *PQdb(const PGconn *conn); ! extern char *PQuser(const PGconn *conn); ! extern char *PQpass(const PGconn *conn); ! extern char *PQhost(const PGconn *conn); ! extern char *PQport(const PGconn *conn); ! extern char *PQtty(const PGconn *conn); ! extern char *PQoptions(const PGconn *conn); ! extern ConnStatusType PQstatus(const PGconn *conn); ! extern char *PQerrorMessage(const PGconn *conn); ! extern int PQsocket(const PGconn *conn); ! extern int PQbackendPID(const PGconn *conn); ! extern int PQclientEncoding(const PGconn *conn); ! extern int PQsetClientEncoding(PGconn *conn, const char *encoding); #ifdef USE_SSL /* Get the SSL structure associated with a connection */ ! extern SSL *PQgetssl(PGconn *conn); #endif /* Enable/disable tracing */ ! extern void PQtrace(PGconn *conn, FILE *debug_port); ! extern void PQuntrace(PGconn *conn); /* Override default notice processor */ ! extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn, ! PQnoticeProcessor proc, ! void *arg); /* === in fe-exec.c === */ /* Quoting strings before inclusion in queries. */ ! extern size_t PQescapeString(char *to, const char *from, size_t length); ! extern unsigned char *PQescapeBytea(unsigned char *bintext, size_t binlen, ! size_t *bytealen); /* Simple synchronous query */ ! extern PGresult *PQexec(PGconn *conn, const char *query); ! extern PGnotify *PQnotifies(PGconn *conn); ! extern void PQfreeNotify(PGnotify *notify); /* Interface for multiple-result or asynchronous queries */ ! extern int PQsendQuery(PGconn *conn, const char *query); ! extern PGresult *PQgetResult(PGconn *conn); /* Routines for managing an asychronous query */ ! extern int PQisBusy(PGconn *conn); ! extern int PQconsumeInput(PGconn *conn); /* Routines for copy in/out */ ! extern int PQgetline(PGconn *conn, char *string, int length); ! extern int PQputline(PGconn *conn, const char *string); ! extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize); ! extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes); ! extern int PQendcopy(PGconn *conn); /* Set blocking/nonblocking connection to the backend */ ! extern int PQsetnonblocking(PGconn *conn, int arg); ! extern int PQisnonblocking(const PGconn *conn); /* Force the write buffer to be written (or at least try) */ ! extern int PQflush(PGconn *conn); /* * "Fast path" interface --- not really recommended for application * use */ ! extern PGresult *PQfn(PGconn *conn, ! int fnid, ! int *result_buf, ! int *result_len, ! int result_is_int, ! const PQArgBlock *args, ! int nargs); /* Accessor functions for PGresult objects */ ! extern ExecStatusType PQresultStatus(const PGresult *res); ! extern char *PQresStatus(ExecStatusType status); ! extern char *PQresultErrorMessage(const PGresult *res); ! extern int PQntuples(const PGresult *res); ! extern int PQnfields(const PGresult *res); ! extern int PQbinaryTuples(const PGresult *res); ! extern char *PQfname(const PGresult *res, int field_num); ! extern int PQfnumber(const PGresult *res, const char *field_name); ! extern Oid PQftype(const PGresult *res, int field_num); ! extern int PQfsize(const PGresult *res, int field_num); ! extern int PQfmod(const PGresult *res, int field_num); ! extern char *PQcmdStatus(PGresult *res); ! extern char *PQoidStatus(const PGresult *res); /* old and ugly */ ! extern Oid PQoidValue(const PGresult *res); /* new and improved */ ! extern char *PQcmdTuples(PGresult *res); ! extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num); ! extern int PQgetlength(const PGresult *res, int tup_num, int field_num); ! extern int PQgetisnull(const PGresult *res, int tup_num, int field_num); /* Delete a PGresult */ ! extern void PQclear(PGresult *res); /* * Make an empty PGresult with given status (some apps find this * useful). If conn is not NULL and status indicates an error, the * conn's errorMessage is copied. */ ! extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status); /* === in fe-print.c === */ ! extern void PQprint(FILE *fout, /* output stream */ ! const PGresult *res, ! const PQprintOpt *ps); /* option structure */ /* * really old printing routines */ ! extern void PQdisplayTuples(const PGresult *res, ! FILE *fp, /* where to send the ! * output */ ! int fillAlign, /* pad the fields with ! * spaces */ ! const char *fieldSep, /* field separator */ ! int printHeader, /* display headers? */ ! int quiet); ! ! extern void PQprintTuples(const PGresult *res, ! FILE *fout, /* output stream */ ! int printAttName, /* print attribute names */ ! int terseOutput, /* delimiter bars */ ! int width); /* width of column, if ! * 0, use variable width */ /* === in fe-lobj.c === */ /* Large-object access routines */ ! extern int lo_open(PGconn *conn, Oid lobjId, int mode); ! extern int lo_close(PGconn *conn, int fd); ! extern int lo_read(PGconn *conn, int fd, char *buf, size_t len); ! extern int lo_write(PGconn *conn, int fd, char *buf, size_t len); ! extern int lo_lseek(PGconn *conn, int fd, int offset, int whence); ! extern Oid lo_creat(PGconn *conn, int mode); ! extern int lo_tell(PGconn *conn, int fd); ! extern int lo_unlink(PGconn *conn, Oid lobjId); ! extern Oid lo_import(PGconn *conn, const char *filename); ! extern int lo_export(PGconn *conn, Oid lobjId, const char *filename); /* === in fe-misc.c === */ /* Determine length of multibyte encoded char at *s */ ! extern int PQmblen(const unsigned char *s, int encoding); /* Get encoding id from environment variable PGCLIENTENCODING */ ! extern int PQenv2encoding(void); #ifdef __cplusplus } --- 180,375 ---- /* make a new client connection to the backend */ /* Asynchronous (non-blocking) */ ! extern PGconn *PQconnectStart(const char *conninfo); ! extern PostgresPollingStatusType PQconnectPoll(PGconn *conn); /* Synchronous (blocking) */ ! extern PGconn *PQconnectdb(const char *conninfo); ! extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport, ! const char *pgoptions, const char *pgtty, ! const char *dbName, ! const char *login, const char *pwd); #define PQsetdb(M_PGHOST,M_PGPORT,M_PGOPT,M_PGTTY,M_DBNAME) \ PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL) /* close the current connection and free the PGconn data structure */ ! extern void PQfinish(PGconn *conn); /* get info about connection options known to PQconnectdb */ ! extern PQconninfoOption *PQconndefaults(void); /* free the data structure returned by PQconndefaults() */ ! extern void PQconninfoFree(PQconninfoOption *connOptions); /* * close the current connection and restablish a new one with the same * parameters */ /* Asynchronous (non-blocking) */ ! extern int PQresetStart(PGconn *conn); ! extern PostgresPollingStatusType PQresetPoll(PGconn *conn); /* Synchronous (blocking) */ ! extern void PQreset(PGconn *conn); /* issue a cancel request */ ! extern int PQrequestCancel(PGconn *conn); /* Accessor functions for PGconn objects */ ! extern char *PQdb(const PGconn *conn); ! extern char *PQuser(const PGconn *conn); ! extern char *PQpass(const PGconn *conn); ! extern char *PQhost(const PGconn *conn); ! extern char *PQport(const PGconn *conn); ! extern char *PQtty(const PGconn *conn); ! extern char *PQoptions(const PGconn *conn); ! extern ConnStatusType PQstatus(const PGconn *conn); ! extern char *PQerrorMessage(const PGconn *conn); ! extern int PQsocket(const PGconn *conn); ! extern int PQbackendPID(const PGconn *conn); ! extern int PQclientEncoding(const PGconn *conn); ! extern int PQsetClientEncoding(PGconn *conn, const char *encoding); #ifdef USE_SSL /* Get the SSL structure associated with a connection */ ! extern SSL *PQgetssl(PGconn *conn); #endif /* Enable/disable tracing */ ! extern void PQtrace(PGconn *conn, FILE *debug_port); ! extern void PQuntrace(PGconn *conn); /* Override default notice processor */ ! extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn, ! PQnoticeProcessor proc, ! void *arg); /* === in fe-exec.c === */ /* Quoting strings before inclusion in queries. */ ! extern size_t PQescapeString(char *to, const char *from, size_t length); ! extern unsigned char *PQescapeBytea(unsigned char *bintext, size_t binlen, ! size_t *bytealen); /* Simple synchronous query */ ! extern PGresult *PQexec(PGconn *conn, const char *query); ! extern PGnotify *PQnotifies(PGconn *conn); ! extern void PQfreeNotify(PGnotify *notify); /* Interface for multiple-result or asynchronous queries */ ! extern int PQsendQuery(PGconn *conn, const char *query); ! extern PGresult *PQgetResult(PGconn *conn); /* Routines for managing an asychronous query */ ! extern int PQisBusy(PGconn *conn); ! extern int PQconsumeInput(PGconn *conn); /* Routines for copy in/out */ ! extern int PQgetline(PGconn *conn, char *string, int length); ! extern int PQputline(PGconn *conn, const char *string); ! extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize); ! extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes); ! extern int PQendcopy(PGconn *conn); /* Set blocking/nonblocking connection to the backend */ ! extern int PQsetnonblocking(PGconn *conn, int arg); ! extern int PQisnonblocking(const PGconn *conn); /* Force the write buffer to be written (or at least try) */ ! extern int PQflush(PGconn *conn); /* * "Fast path" interface --- not really recommended for application * use */ ! extern PGresult *PQfn(PGconn *conn, ! int fnid, ! int *result_buf, ! int *result_len, ! int result_is_int, ! const PQArgBlock *args, ! int nargs); /* Accessor functions for PGresult objects */ ! extern ExecStatusType PQresultStatus(const PGresult *res); ! extern char *PQresStatus(ExecStatusType status); ! extern char *PQresultErrorMessage(const PGresult *res); ! extern int PQntuples(const PGresult *res); ! extern int PQnfields(const PGresult *res); ! extern int PQbinaryTuples(const PGresult *res); ! extern char *PQfname(const PGresult *res, int field_num); ! extern int PQfnumber(const PGresult *res, const char *field_name); ! extern Oid PQftype(const PGresult *res, int field_num); ! extern int PQfsize(const PGresult *res, int field_num); ! extern int PQfmod(const PGresult *res, int field_num); ! extern char *PQcmdStatus(PGresult *res); ! extern char *PQoidStatus(const PGresult *res); /* old and ugly */ ! extern Oid PQoidValue(const PGresult *res); /* new and improved */ ! extern char *PQcmdTuples(PGresult *res); ! extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num); ! extern int PQgetlength(const PGresult *res, int tup_num, int field_num); ! extern int PQgetisnull(const PGresult *res, int tup_num, int field_num); /* Delete a PGresult */ ! extern void PQclear(PGresult *res); /* * Make an empty PGresult with given status (some apps find this * useful). If conn is not NULL and status indicates an error, the * conn's errorMessage is copied. */ ! extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status); /* === in fe-print.c === */ ! extern void ! PQprint(FILE *fout, /* output stream */ ! const PGresult *res, ! const PQprintOpt *ps); /* option structure */ /* * really old printing routines */ ! extern void ! PQdisplayTuples(const PGresult *res, ! FILE *fp, /* where to send the output */ ! int fillAlign, /* pad the fields with spaces */ ! const char *fieldSep, /* field separator */ ! int printHeader, /* display headers? */ ! int quiet); ! ! extern void ! PQprintTuples(const PGresult *res, ! FILE *fout, /* output stream */ ! int printAttName, /* print attribute names */ ! int terseOutput, /* delimiter bars */ ! int width); /* width of column, if 0, use variable ! * width */ /* === in fe-lobj.c === */ /* Large-object access routines */ ! extern int lo_open(PGconn *conn, Oid lobjId, int mode); ! extern int lo_close(PGconn *conn, int fd); ! extern int lo_read(PGconn *conn, int fd, char *buf, size_t len); ! extern int lo_write(PGconn *conn, int fd, char *buf, size_t len); ! extern int lo_lseek(PGconn *conn, int fd, int offset, int whence); ! extern Oid lo_creat(PGconn *conn, int mode); ! extern int lo_tell(PGconn *conn, int fd); ! extern int lo_unlink(PGconn *conn, Oid lobjId); ! extern Oid lo_import(PGconn *conn, const char *filename); ! extern int lo_export(PGconn *conn, Oid lobjId, const char *filename); /* === in fe-misc.c === */ /* Determine length of multibyte encoded char at *s */ ! extern int PQmblen(const unsigned char *s, int encoding); /* Get encoding id from environment variable PGCLIENTENCODING */ ! extern int PQenv2encoding(void); #ifdef __cplusplus } Index: src/interfaces/odbc/gpps.h =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/odbc/gpps.h,v retrieving revision 1.17 diff -c -r1.17 gpps.h *** src/interfaces/odbc/gpps.h 2001/10/28 06:26:13 1.17 --- src/interfaces/odbc/gpps.h 2001/11/07 22:19:08 *************** *** 18,41 **** { #endif ! DWORD ! GetPrivateProfileString(const char *theSection, /* section name */ ! const char *theKey, /* search key name */ ! const char *theDefault, /* default value if not ! * found */ ! char *theReturnBuffer, /* return valuse stored ! * here */ ! size_t theBufferLength, /* byte length of return ! * buffer */ ! const char *theIniFileName); /* pathname of ini file ! * to search */ ! DWORD ! WritePrivateProfileString(const char *theSection, /* section name */ ! const char *theKey, /* write key name */ ! const char *theBuffer, /* input buffer */ ! const char *theIniFileName); /* pathname of ini file ! * to write */ #ifdef __cplusplus } --- 18,41 ---- { #endif ! DWORD ! GetPrivateProfileString(const char *theSection, /* section name */ ! const char *theKey, /* search key name */ ! const char *theDefault, /* default value if not ! * found */ ! char *theReturnBuffer, /* return valuse stored ! * here */ ! size_t theBufferLength, /* byte length of return ! * buffer */ ! const char *theIniFileName); /* pathname of ini file ! * to search */ ! DWORD ! WritePrivateProfileString(const char *theSection, /* section name */ ! const char *theKey, /* write key name */ ! const char *theBuffer, /* input buffer */ ! const char *theIniFileName); /* pathname of ini file ! * to write */ #ifdef __cplusplus } Index: src/interfaces/odbc/isql.h =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/odbc/isql.h,v retrieving revision 1.17 diff -c -r1.17 isql.h *** src/interfaces/odbc/isql.h 2001/11/05 17:46:38 1.17 --- src/interfaces/odbc/isql.h 2001/11/07 22:19:10 *************** *** 135,243 **** { #endif ! RETCODE SQL_API SQLAllocConnect(HENV henv, ! HDBC FAR * phdbc); ! RETCODE SQL_API SQLAllocEnv(HENV FAR * phenv); ! RETCODE SQL_API SQLAllocStmt(HDBC hdbc, ! HSTMT FAR * phstmt); ! RETCODE SQL_API SQLBindCol(HSTMT hstmt, ! UWORD icol, ! SWORD fCType, ! PTR rgbValue, ! SDWORD cbValueMax, ! SDWORD FAR * pcbValue); ! ! RETCODE SQL_API SQLCancel(HSTMT hstmt); ! ! RETCODE SQL_API SQLColAttributes(HSTMT hstmt, ! UWORD icol, ! UWORD fDescType, ! PTR rgbDesc, ! SWORD cbDescMax, ! SWORD FAR * pcbDesc, ! SDWORD FAR * pfDesc); ! ! RETCODE SQL_API SQLConnect(HDBC hdbc, ! UCHAR FAR * szDSN, ! SWORD cbDSN, ! UCHAR FAR * szUID, ! SWORD cbUID, ! UCHAR FAR * szAuthStr, ! SWORD cbAuthStr); ! ! RETCODE SQL_API SQLDescribeCol(HSTMT hstmt, ! UWORD icol, ! UCHAR FAR * szColName, ! SWORD cbColNameMax, ! SWORD FAR * pcbColName, ! SWORD FAR * pfSqlType, ! UDWORD FAR * pcbColDef, ! SWORD FAR * pibScale, ! SWORD FAR * pfNullable); ! ! RETCODE SQL_API SQLDisconnect(HDBC hdbc); ! ! RETCODE SQL_API SQLError(HENV henv, ! HDBC hdbc, ! HSTMT hstmt, ! UCHAR FAR * szSqlState, ! SDWORD FAR * pfNativeError, ! UCHAR FAR * szErrorMsg, ! SWORD cbErrorMsgMax, ! SWORD FAR * pcbErrorMsg); ! ! RETCODE SQL_API SQLExecDirect(HSTMT hstmt, ! UCHAR FAR * szSqlStr, ! SDWORD cbSqlStr); ! ! RETCODE SQL_API SQLExecute(HSTMT hstmt); ! ! RETCODE SQL_API SQLFetch(HSTMT hstmt); ! ! RETCODE SQL_API SQLFreeConnect(HDBC hdbc); ! ! RETCODE SQL_API SQLFreeEnv(HENV henv); ! ! RETCODE SQL_API SQLFreeStmt(HSTMT hstmt, ! UWORD fOption); ! ! RETCODE SQL_API SQLGetCursorName(HSTMT hstmt, ! UCHAR FAR * szCursor, ! SWORD cbCursorMax, ! SWORD FAR * pcbCursor); ! ! RETCODE SQL_API SQLNumResultCols(HSTMT hstmt, ! SWORD FAR * pccol); ! ! RETCODE SQL_API SQLPrepare(HSTMT hstmt, ! UCHAR FAR * szSqlStr, ! SDWORD cbSqlStr); ! ! RETCODE SQL_API SQLRowCount(HSTMT hstmt, ! SDWORD FAR * pcrow); ! ! RETCODE SQL_API SQLSetCursorName(HSTMT hstmt, ! UCHAR FAR * szCursor, ! SWORD cbCursor); ! ! RETCODE SQL_API SQLTransact(HENV henv, ! HDBC hdbc, ! UWORD fType); ! ! RETCODE SQL_API SQLSetParam(HSTMT hstmt, ! UWORD ipar, ! SWORD fCType, ! SWORD fSqlType, ! UDWORD cbColDef, ! SWORD ibScale, ! PTR rgbValue, ! SDWORD FAR * pcbValue); ! ! RETCODE SQL_API SQLDataSources(HENV henv, ! UWORD Direction, UCHAR FAR * ServerName, ! WORD BufferLength1, WORD *NameLength1, ! UCHAR FAR * Description, WORD BufferLength2, ! WORD *NameLength2); #ifdef __cplusplus } --- 135,243 ---- { #endif ! RETCODE SQL_API SQLAllocConnect(HENV henv, ! HDBC FAR * phdbc); ! RETCODE SQL_API SQLAllocEnv(HENV FAR * phenv); ! RETCODE SQL_API SQLAllocStmt(HDBC hdbc, ! HSTMT FAR * phstmt); ! RETCODE SQL_API SQLBindCol(HSTMT hstmt, ! UWORD icol, ! SWORD fCType, ! PTR rgbValue, ! SDWORD cbValueMax, ! SDWORD FAR * pcbValue); ! ! RETCODE SQL_API SQLCancel(HSTMT hstmt); ! ! RETCODE SQL_API SQLColAttributes(HSTMT hstmt, ! UWORD icol, ! UWORD fDescType, ! PTR rgbDesc, ! SWORD cbDescMax, ! SWORD FAR * pcbDesc, ! SDWORD FAR * pfDesc); ! ! RETCODE SQL_API SQLConnect(HDBC hdbc, ! UCHAR FAR * szDSN, ! SWORD cbDSN, ! UCHAR FAR * szUID, ! SWORD cbUID, ! UCHAR FAR * szAuthStr, ! SWORD cbAuthStr); ! ! RETCODE SQL_API SQLDescribeCol(HSTMT hstmt, ! UWORD icol, ! UCHAR FAR * szColName, ! SWORD cbColNameMax, ! SWORD FAR * pcbColName, ! SWORD FAR * pfSqlType, ! UDWORD FAR * pcbColDef, ! SWORD FAR * pibScale, ! SWORD FAR * pfNullable); ! ! RETCODE SQL_API SQLDisconnect(HDBC hdbc); ! ! RETCODE SQL_API SQLError(HENV henv, ! HDBC hdbc, ! HSTMT hstmt, ! UCHAR FAR * szSqlState, ! SDWORD FAR * pfNativeError, ! UCHAR FAR * szErrorMsg, ! SWORD cbErrorMsgMax, ! SWORD FAR * pcbErrorMsg); ! ! RETCODE SQL_API SQLExecDirect(HSTMT hstmt, ! UCHAR FAR * szSqlStr, ! SDWORD cbSqlStr); ! ! RETCODE SQL_API SQLExecute(HSTMT hstmt); ! ! RETCODE SQL_API SQLFetch(HSTMT hstmt); ! ! RETCODE SQL_API SQLFreeConnect(HDBC hdbc); ! ! RETCODE SQL_API SQLFreeEnv(HENV henv); ! ! RETCODE SQL_API SQLFreeStmt(HSTMT hstmt, ! UWORD fOption); ! ! RETCODE SQL_API SQLGetCursorName(HSTMT hstmt, ! UCHAR FAR * szCursor, ! SWORD cbCursorMax, ! SWORD FAR * pcbCursor); ! ! RETCODE SQL_API SQLNumResultCols(HSTMT hstmt, ! SWORD FAR * pccol); ! ! RETCODE SQL_API SQLPrepare(HSTMT hstmt, ! UCHAR FAR * szSqlStr, ! SDWORD cbSqlStr); ! ! RETCODE SQL_API SQLRowCount(HSTMT hstmt, ! SDWORD FAR * pcrow); ! ! RETCODE SQL_API SQLSetCursorName(HSTMT hstmt, ! UCHAR FAR * szCursor, ! SWORD cbCursor); ! ! RETCODE SQL_API SQLTransact(HENV henv, ! HDBC hdbc, ! UWORD fType); ! ! RETCODE SQL_API SQLSetParam(HSTMT hstmt, ! UWORD ipar, ! SWORD fCType, ! SWORD fSqlType, ! UDWORD cbColDef, ! SWORD ibScale, ! PTR rgbValue, ! SDWORD FAR * pcbValue); ! ! RETCODE SQL_API SQLDataSources(HENV henv, ! UWORD Direction, UCHAR FAR * ServerName, ! WORD BufferLength1, WORD *NameLength1, ! UCHAR FAR * Description, WORD BufferLength2, ! WORD *NameLength2); #ifdef __cplusplus } Index: src/interfaces/odbc/isqlext.h =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/odbc/isqlext.h,v retrieving revision 1.13 diff -c -r1.13 isqlext.h *** src/interfaces/odbc/isqlext.h 2001/11/05 17:46:38 1.13 --- src/interfaces/odbc/isqlext.h 2001/11/07 22:19:11 *************** *** 1342,1556 **** { #endif ! RETCODE SQL_API SQLSetConnectOption(HDBC, UWORD, UDWORD); ! RETCODE SQL_API SQLNumResultCols(HSTMT, SWORD FAR *); /* * function prototypes previously missing from isqlext.h */ ! RETCODE SQL_API SQLColumns(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UCHAR FAR * szColumnName, ! SWORD cbColumnName); ! ! RETCODE SQL_API SQLDriverConnect(HDBC hdbc, ! HWND hwnd, ! UCHAR FAR * szConnStrIn, ! SWORD cbConnStrIn, ! UCHAR FAR * szConnStrOut, ! SWORD cbConnStrOutMax, ! SWORD FAR * pcbConnStrOut, ! UWORD fDriverCompletion); ! ! RETCODE SQL_API SQLGetConnectOption(HDBC hdbc, ! UWORD fOption, ! PTR pvParam); ! ! RETCODE SQL_API SQLGetData(HSTMT hstmt, ! UWORD icol, ! SWORD fCType, ! PTR rgbValue, ! SDWORD cbValueMax, ! SDWORD FAR * pcbValue); ! ! RETCODE SQL_API SQLGetFunctions(HDBC hdbc, ! UWORD fFunction, ! UWORD FAR * pfExists); ! ! RETCODE SQL_API SQLGetInfo(HDBC hdbc, ! UWORD fInfoType, ! PTR rgbInfoValue, ! SWORD cbInfoValueMax, ! SWORD FAR * pcbInfoValue); ! ! RETCODE SQL_API SQLGetStmtOption(HSTMT hstmt, ! UWORD fOption, ! PTR pvParam); ! ! RETCODE SQL_API SQLGetTypeInfo(HSTMT hstmt, ! SWORD fSqlType); ! ! RETCODE SQL_API SQLParamData(HSTMT hstmt, ! PTR FAR * prgbValue); ! ! RETCODE SQL_API SQLPutData(HSTMT hstmt, ! PTR rgbValue, ! SDWORD cbValue); ! ! RETCODE SQL_API SQLSetStmtOption(HSTMT hstmt, ! UWORD fOption, ! UDWORD vParam); ! ! RETCODE SQL_API SQLSpecialColumns(HSTMT hstmt, ! UWORD fColType, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UWORD fScope, ! UWORD fNullable); ! ! RETCODE SQL_API SQLStatistics(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UWORD fUnique, ! UWORD fAccuracy); ! ! RETCODE SQL_API SQLTables(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UCHAR FAR * szTableType, ! SWORD cbTableType); ! ! RETCODE SQL_API SQLBrowseConnect(HDBC hdbc, ! UCHAR FAR * szConnStrIn, ! SWORD cbConnStrIn, ! UCHAR FAR * szConnStrOut, ! SWORD cbConnStrOutMax, ! SWORD FAR * pcbConnStrOut); ! ! RETCODE SQL_API SQLColumnPrivileges(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UCHAR FAR * szColumnName, ! SWORD cbColumnName); ! ! RETCODE SQL_API SQLDescribeParam(HSTMT hstmt, ! UWORD ipar, ! SWORD FAR * pfSqlType, ! UDWORD FAR * pcbColDef, ! SWORD FAR * pibScale, ! SWORD FAR * pfNullable); ! ! RETCODE SQL_API SQLExtendedFetch(HSTMT hstmt, ! UWORD fFetchType, ! SDWORD irow, ! UDWORD FAR * pcrow, ! UWORD FAR * rgfRowStatus); ! ! RETCODE SQL_API SQLForeignKeys(HSTMT hstmt, ! UCHAR FAR * szPkTableQualifier, ! SWORD cbPkTableQualifier, ! UCHAR FAR * szPkTableOwner, ! SWORD cbPkTableOwner, ! UCHAR FAR * szPkTableName, ! SWORD cbPkTableName, ! UCHAR FAR * szFkTableQualifier, ! SWORD cbFkTableQualifier, ! UCHAR FAR * szFkTableOwner, ! SWORD cbFkTableOwner, ! UCHAR FAR * szFkTableName, ! SWORD cbFkTableName); ! ! RETCODE SQL_API SQLMoreResults(HSTMT hstmt); ! ! RETCODE SQL_API SQLNativeSql(HDBC hdbc, ! UCHAR FAR * szSqlStrIn, ! SDWORD cbSqlStrIn, ! UCHAR FAR * szSqlStr, ! SDWORD cbSqlStrMax, ! SDWORD FAR * pcbSqlStr); ! ! RETCODE SQL_API SQLNumParams(HSTMT hstmt, ! SWORD FAR * pcpar); ! ! RETCODE SQL_API SQLParamOptions(HSTMT hstmt, ! UDWORD crow, ! UDWORD FAR * pirow); ! ! RETCODE SQL_API SQLPrimaryKeys(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName); ! ! RETCODE SQL_API SQLProcedureColumns(HSTMT hstmt, ! UCHAR FAR * szProcQualifier, ! SWORD cbProcQualifier, ! UCHAR FAR * szProcOwner, ! SWORD cbProcOwner, ! UCHAR FAR * szProcName, ! SWORD cbProcName, ! UCHAR FAR * szColumnName, ! SWORD cbColumnName); ! ! RETCODE SQL_API SQLProcedures(HSTMT hstmt, ! UCHAR FAR * szProcQualifier, ! SWORD cbProcQualifier, ! UCHAR FAR * szProcOwner, ! SWORD cbProcOwner, ! UCHAR FAR * szProcName, ! SWORD cbProcName); ! ! RETCODE SQL_API SQLSetPos(HSTMT hstmt, ! UWORD irow, ! UWORD fOption, ! UWORD fLock); ! ! RETCODE SQL_API SQLTablePrivileges(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName); ! ! RETCODE SQL_API SQLBindParameter(HSTMT hstmt, ! UWORD ipar, ! SWORD fParamType, ! SWORD fCType, ! SWORD fSqlType, ! UDWORD cbColDef, ! SWORD ibScale, ! PTR rgbValue, ! SDWORD cbValueMax, ! SDWORD FAR * pcbValue); ! ! RETCODE SQL_API SQLSetScrollOptions(HSTMT hstmt, ! UWORD fConcurrency, ! SDWORD crowKeyset, ! UWORD crowRowset); #ifdef __cplusplus --- 1342,1556 ---- { #endif ! RETCODE SQL_API SQLSetConnectOption(HDBC, UWORD, UDWORD); ! RETCODE SQL_API SQLNumResultCols(HSTMT, SWORD FAR *); /* * function prototypes previously missing from isqlext.h */ ! RETCODE SQL_API SQLColumns(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UCHAR FAR * szColumnName, ! SWORD cbColumnName); ! ! RETCODE SQL_API SQLDriverConnect(HDBC hdbc, ! HWND hwnd, ! UCHAR FAR * szConnStrIn, ! SWORD cbConnStrIn, ! UCHAR FAR * szConnStrOut, ! SWORD cbConnStrOutMax, ! SWORD FAR * pcbConnStrOut, ! UWORD fDriverCompletion); ! ! RETCODE SQL_API SQLGetConnectOption(HDBC hdbc, ! UWORD fOption, ! PTR pvParam); ! ! RETCODE SQL_API SQLGetData(HSTMT hstmt, ! UWORD icol, ! SWORD fCType, ! PTR rgbValue, ! SDWORD cbValueMax, ! SDWORD FAR * pcbValue); ! ! RETCODE SQL_API SQLGetFunctions(HDBC hdbc, ! UWORD fFunction, ! UWORD FAR * pfExists); ! ! RETCODE SQL_API SQLGetInfo(HDBC hdbc, ! UWORD fInfoType, ! PTR rgbInfoValue, ! SWORD cbInfoValueMax, ! SWORD FAR * pcbInfoValue); ! ! RETCODE SQL_API SQLGetStmtOption(HSTMT hstmt, ! UWORD fOption, ! PTR pvParam); ! ! RETCODE SQL_API SQLGetTypeInfo(HSTMT hstmt, ! SWORD fSqlType); ! ! RETCODE SQL_API SQLParamData(HSTMT hstmt, ! PTR FAR * prgbValue); ! ! RETCODE SQL_API SQLPutData(HSTMT hstmt, ! PTR rgbValue, ! SDWORD cbValue); ! ! RETCODE SQL_API SQLSetStmtOption(HSTMT hstmt, ! UWORD fOption, ! UDWORD vParam); ! ! RETCODE SQL_API SQLSpecialColumns(HSTMT hstmt, ! UWORD fColType, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UWORD fScope, ! UWORD fNullable); ! ! RETCODE SQL_API SQLStatistics(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UWORD fUnique, ! UWORD fAccuracy); ! ! RETCODE SQL_API SQLTables(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UCHAR FAR * szTableType, ! SWORD cbTableType); ! ! RETCODE SQL_API SQLBrowseConnect(HDBC hdbc, ! UCHAR FAR * szConnStrIn, ! SWORD cbConnStrIn, ! UCHAR FAR * szConnStrOut, ! SWORD cbConnStrOutMax, ! SWORD FAR * pcbConnStrOut); ! ! RETCODE SQL_API SQLColumnPrivileges(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName, ! UCHAR FAR * szColumnName, ! SWORD cbColumnName); ! ! RETCODE SQL_API SQLDescribeParam(HSTMT hstmt, ! UWORD ipar, ! SWORD FAR * pfSqlType, ! UDWORD FAR * pcbColDef, ! SWORD FAR * pibScale, ! SWORD FAR * pfNullable); ! ! RETCODE SQL_API SQLExtendedFetch(HSTMT hstmt, ! UWORD fFetchType, ! SDWORD irow, ! UDWORD FAR * pcrow, ! UWORD FAR * rgfRowStatus); ! ! RETCODE SQL_API SQLForeignKeys(HSTMT hstmt, ! UCHAR FAR * szPkTableQualifier, ! SWORD cbPkTableQualifier, ! UCHAR FAR * szPkTableOwner, ! SWORD cbPkTableOwner, ! UCHAR FAR * szPkTableName, ! SWORD cbPkTableName, ! UCHAR FAR * szFkTableQualifier, ! SWORD cbFkTableQualifier, ! UCHAR FAR * szFkTableOwner, ! SWORD cbFkTableOwner, ! UCHAR FAR * szFkTableName, ! SWORD cbFkTableName); ! ! RETCODE SQL_API SQLMoreResults(HSTMT hstmt); ! ! RETCODE SQL_API SQLNativeSql(HDBC hdbc, ! UCHAR FAR * szSqlStrIn, ! SDWORD cbSqlStrIn, ! UCHAR FAR * szSqlStr, ! SDWORD cbSqlStrMax, ! SDWORD FAR * pcbSqlStr); ! ! RETCODE SQL_API SQLNumParams(HSTMT hstmt, ! SWORD FAR * pcpar); ! ! RETCODE SQL_API SQLParamOptions(HSTMT hstmt, ! UDWORD crow, ! UDWORD FAR * pirow); ! ! RETCODE SQL_API SQLPrimaryKeys(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName); ! ! RETCODE SQL_API SQLProcedureColumns(HSTMT hstmt, ! UCHAR FAR * szProcQualifier, ! SWORD cbProcQualifier, ! UCHAR FAR * szProcOwner, ! SWORD cbProcOwner, ! UCHAR FAR * szProcName, ! SWORD cbProcName, ! UCHAR FAR * szColumnName, ! SWORD cbColumnName); ! ! RETCODE SQL_API SQLProcedures(HSTMT hstmt, ! UCHAR FAR * szProcQualifier, ! SWORD cbProcQualifier, ! UCHAR FAR * szProcOwner, ! SWORD cbProcOwner, ! UCHAR FAR * szProcName, ! SWORD cbProcName); ! ! RETCODE SQL_API SQLSetPos(HSTMT hstmt, ! UWORD irow, ! UWORD fOption, ! UWORD fLock); ! ! RETCODE SQL_API SQLTablePrivileges(HSTMT hstmt, ! UCHAR FAR * szTableQualifier, ! SWORD cbTableQualifier, ! UCHAR FAR * szTableOwner, ! SWORD cbTableOwner, ! UCHAR FAR * szTableName, ! SWORD cbTableName); ! ! RETCODE SQL_API SQLBindParameter(HSTMT hstmt, ! UWORD ipar, ! SWORD fParamType, ! SWORD fCType, ! SWORD fSqlType, ! UDWORD cbColDef, ! SWORD ibScale, ! PTR rgbValue, ! SDWORD cbValueMax, ! SDWORD FAR * pcbValue); ! ! RETCODE SQL_API SQLSetScrollOptions(HSTMT hstmt, ! UWORD fConcurrency, ! SDWORD crowKeyset, ! UWORD crowRowset); #ifdef __cplusplus Index: src/pl/plpgsql/src/pl_exec.c =================================================================== RCS file: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v retrieving revision 1.49 diff -c -r1.49 pl_exec.c *** src/pl/plpgsql/src/pl_exec.c 2001/11/05 19:41:56 1.49 --- src/pl/plpgsql/src/pl_exec.c 2001/11/07 22:19:21 *************** *** 419,424 **** --- 419,425 ---- func->fn_rettypelem, -1, &fcinfo->isnull); + /* * If the functions return type isn't by value, copy the value * into upper executor memory context.

Re: Fix for 'extern "C"' indenting

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bruce Momjian  writes:
> Attached is a patch which is a run of an improved pgindent over several
> include files that contained 'extern "C"' blocks.
> Do people want this applied or should we just live with a ugly indenting
> of a few C files for 7.2?

I'd say go for it ... particularly if you already committed the
corresponding pgindent fix.  It would be weird to ship a pgindent
that doesn't agree with the formatted files.

			regards, tom lane

Re: Fix for 'extern "C"' indenting

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
> Bruce Momjian  writes:
> > Attached is a patch which is a run of an improved pgindent over several
> > include files that contained 'extern "C"' blocks.
> > Do people want this applied or should we just live with a ugly indenting
> > of a few C files for 7.2?
> 
> I'd say go for it ... particularly if you already committed the
> corresponding pgindent fix.  It would be weird to ship a pgindent
> that doesn't agree with the formatted files.

Done.  FYI, pgindent sometimes doesn't match what we ship because I
tweek it for the _next_ run, which may not happen for 6-9 months.

The interesting case with 'extern "C"' is that pgindent was properly
indenting the block, but in this case, it just made no sense.  It also
thought it was in some kind of function and didn't understand certain
prototypes.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
FAQ