1
- /* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/connect.c,v 1.14 2001/10/31 04:49:44 momjian Exp $ */
1
+ /* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/connect.c,v 1.15 2001/11/14 11:11:49 meskes Exp $ */
2
2
3
3
#include "postgres_fe.h"
4
4
@@ -12,7 +12,7 @@ static struct connection *all_connections = NULL,
12
12
* actual_connection = NULL ;
13
13
14
14
struct connection *
15
- get_connection (const char * connection_name )
15
+ ECPGget_connection (const char * connection_name )
16
16
{
17
17
struct connection * con = all_connections ;
18
18
@@ -63,10 +63,10 @@ ecpg_finish(struct connection * act)
63
63
bool
64
64
ECPGsetcommit (int lineno , const char * mode , const char * connection_name )
65
65
{
66
- struct connection * con = get_connection (connection_name );
66
+ struct connection * con = ECPGget_connection (connection_name );
67
67
PGresult * results ;
68
68
69
- if (!ecpg_init (con , connection_name , lineno ))
69
+ if (!ECPGinit (con , connection_name , lineno ))
70
70
return (false);
71
71
72
72
ECPGlog ("ECPGsetcommit line %d action = %s connection = %s\n" , lineno , mode , con -> name );
@@ -106,9 +106,9 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
106
106
bool
107
107
ECPGsetconn (int lineno , const char * connection_name )
108
108
{
109
- struct connection * con = get_connection (connection_name );
109
+ struct connection * con = ECPGget_connection (connection_name );
110
110
111
- if (!ecpg_init (con , connection_name , lineno ))
111
+ if (!ECPGinit (con , connection_name , lineno ))
112
112
return (false);
113
113
114
114
actual_connection = con ;
@@ -269,9 +269,9 @@ ECPGconnect(int lineno, const char *name, const char *user, const char *passwd,
269
269
* realname = NULL ,
270
270
* options = NULL ;
271
271
272
- init_sqlca ();
272
+ ECPGinit_sqlca ();
273
273
274
- if ((this = (struct connection * ) ecpg_alloc (sizeof (struct connection ), lineno )) == NULL )
274
+ if ((this = (struct connection * ) ECPGalloc (sizeof (struct connection ), lineno )) == NULL )
275
275
return false;
276
276
277
277
if (dbname == NULL && connection_name == NULL )
@@ -393,9 +393,9 @@ ECPGconnect(int lineno, const char *name, const char *user, const char *passwd,
393
393
394
394
/* add connection to our list */
395
395
if (connection_name != NULL )
396
- this -> name = ecpg_strdup (connection_name , lineno );
396
+ this -> name = ECPGstrdup (connection_name , lineno );
397
397
else
398
- this -> name = ecpg_strdup (realname , lineno );
398
+ this -> name = ECPGstrdup (realname , lineno );
399
399
400
400
this -> cache_head = NULL ;
401
401
@@ -465,7 +465,7 @@ ECPGdisconnect(int lineno, const char *connection_name)
465
465
466
466
if (strcmp (connection_name , "ALL" ) == 0 )
467
467
{
468
- init_sqlca ();
468
+ ECPGinit_sqlca ();
469
469
for (con = all_connections ; con ;)
470
470
{
471
471
struct connection * f = con ;
@@ -476,9 +476,9 @@ ECPGdisconnect(int lineno, const char *connection_name)
476
476
}
477
477
else
478
478
{
479
- con = get_connection (connection_name );
479
+ con = ECPGget_connection (connection_name );
480
480
481
- if (!ecpg_init (con , connection_name , lineno ))
481
+ if (!ECPGinit (con , connection_name , lineno ))
482
482
return (false);
483
483
else
484
484
ecpg_finish (con );
0 commit comments