]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Adjusting unipos and unisql about rou_alert (can't call it)
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Tue, 17 Jun 2025 00:29:04 +0000 (20:29 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Tue, 17 Jun 2025 00:29:04 +0000 (20:29 -0400)
lib/unipos.c
lib/unisql.c

index 820243d04788648d217a2636b35c619fd7b356ce..2d4c022f77670ebe5cfc4266fd8bd847c7d85b9c 100644 (file)
@@ -7,7 +7,7 @@
 /********************************************************/
 #include        <libpq-fe.h>
 #include        <stdio.h>
-#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 {
index 235cdfc29a379b741193aa14c186c87b054ab772..4661ff74c6521a5b1e0df42f0ee4a1b5aec058c0 100644 (file)
@@ -7,7 +7,6 @@
 /********************************************************/
 #include        <stdio.h>
 
-#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,"