From 7b9f8e3748c3f48bdd1db627c5d0a303ad1ad97b Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Mon, 16 Jun 2025 20:29:04 -0400 Subject: [PATCH] Adjusting unipos and unisql about rou_alert (can't call it) --- lib/unipos.c | 12 ++++++------ lib/unisql.c | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/unipos.c b/lib/unipos.c index 820243d..2d4c022 100644 --- a/lib/unipos.c +++ b/lib/unipos.c @@ -7,7 +7,7 @@ /********************************************************/ #include #include -#include "subrou.h" + #include "unipos.h" /* @@ -19,7 +19,7 @@ /* postgresq SQL server. */ /* */ /********************************************************/ -PUBLIC POSPTR *pos_opensql(const char *host,const char *sqlport,const char *dbname) +POSPTR *pos_opensql(const char *host,const char *sqlport,const char *dbname) { #define OPEP "unipos.c:pos_opensql," @@ -31,8 +31,8 @@ z=(char *)0; pf=PQsetdbLogin(host,sqlport,z,z,dbname,z,z); // Check if the connection is successful if (PQstatus(pf)!=CONNECTION_OK) { - (void) rou_alert(0,"%s Connection to database '%s' failed, cause '%s'", - OPEP,dbname,PQerrorMessage(pf)); + (void) fprintf(stderr,"%s Connection to database '%s' failed, cause '%s'\n", + OPEP,dbname,PQerrorMessage(pf)); (void) PQfinish(pf); pf=(PGconn *)0; } @@ -48,7 +48,7 @@ return (POSPTR *)pf; /* postgresql SQL server. */ /* */ /********************************************************/ -PUBLIC POSPTR *pos_closesql(POSPTR *posptr) +POSPTR *pos_closesql(POSPTR *posptr) { #define OPEP "unipos.c:pos_closesql," @@ -57,7 +57,7 @@ PGconn *pf; pf=(PGconn *)posptr; if (pf==(PGconn *)0) { - (void) rou_alert(0,"%s Database link already closedi (Bug?)",OPEP); + (void) fprintf(stderr,"%s Database link already closedi (Bug?)\n",OPEP); (void) PQfinish(pf); } else { diff --git a/lib/unisql.c b/lib/unisql.c index 235cdfc..4661ff7 100644 --- a/lib/unisql.c +++ b/lib/unisql.c @@ -7,7 +7,6 @@ /********************************************************/ #include -#include "subrou.h" #include "unisql.h" /* @@ -19,7 +18,7 @@ /* postgresq SQL server. */ /* */ /********************************************************/ -PUBLIC SQLPTR *sql_opensql(const char *host,const char *sqlport,const char *dbname) +SQLPTR *sql_opensql(const char *host,const char *sqlport,const char *dbname) { #define OPEP "unisql.c:sql_opensql," @@ -40,7 +39,7 @@ return sqlptr; /* postgresql SQL server. */ /* */ /********************************************************/ -PUBLIC SQLPTR *sql_closesql(SQLPTR *sqlptr) +SQLPTR *sql_closesql(SQLPTR *sqlptr) { #define OPEP "sqlpos.c:sql_closesql," -- 2.47.3