From: Magnus Hagander <mha@sollentuna.net>

Here is a first patch to cleanup the backend side of libpq.
This patch removes all external dependencies on the "Pfin" and "Pfout" that
are declared in pqcomm.h. These variables are also changed to "static" to
make sure.
Almost all the change is in the handler of the "copy" command - most other
areas of the backend already used the correct functions.
This change will make the way for cleanup of the internal stuff there - now
that all the functions accessing the file descriptors are confined to a
single directory.
This commit is contained in:
Marc G. Fournier
1999-01-11 03:56:11 +00:00
parent 6d5d673ca8
commit 3b3ffc8d97
5 changed files with 179 additions and 72 deletions

View File

@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-be.h,v 1.12 1998/09/01 04:36:27 momjian Exp $
* $Id: libpq-be.h,v 1.13 1999/01/11 03:56:11 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -131,8 +131,6 @@ typedef struct Port
} Port;
extern FILE *Pfout,
*Pfin;
extern ProtocolVersion FrontendProtocol;

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq.h,v 1.21 1998/09/01 04:36:29 momjian Exp $
* $Id: libpq.h,v 1.22 1999/01/11 03:56:11 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -258,6 +258,8 @@ extern void pq_flush(void);
extern int pq_getstr(char *s, int maxlen);
extern int PQgetline(char *s, int maxlen);
extern int PQputline(char *s);
extern int pq_getchar(void);
extern int pq_peekchar(void);
extern int pq_getnchar(char *s, int off, int maxlen);
extern int pq_getint(int b);
extern void pq_putstr(char *s);