From: Jean-Marc Pigeon (Delson) Date: Tue, 17 Jun 2025 04:02:38 +0000 (-0400) Subject: Renameing unisql to unimar X-Git-Tag: tag-0.9~138 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=2d1ddd65017b56452136e172d343ac8e293bcd76;p=jmp%2Fmailleur Renameing unisql to unimar --- diff --git a/lib/Makefile b/lib/Makefile index aa147a7..5131e34 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -26,15 +26,15 @@ shared : libposql libmysql libposql: unipos.o $(CC) -shared -Wl,-soname,$@.so.1 -o $@.so.1.0 unipos.o -libmysql: unisql.o - $(CC) -shared -Wl,-soname,$@.so.1 -o $@.so.1.0 unisql.o +libmysql: unimar.o + $(CC) -shared -Wl,-soname,$@.so.1 -o $@.so.1.0 unimar.o #-------------------------------------------------------------------- unipos.o: unipos.h $(CC) $(CFLAGS) -c -fPIC -o $@ unipos.c -unisql.o: unisql.h - $(CC) $(CFLAGS) -c -fPIC -o $@ unisql.c +unimar.o: unimar.h + $(CC) $(CFLAGS) -c -fPIC -o $@ unimar.c #-------------------------------------------------------------------- #Equivalences diff --git a/lib/devsql.c b/lib/devsql.c index bfc2e4e..235d435 100644 --- a/lib/devsql.c +++ b/lib/devsql.c @@ -24,7 +24,7 @@ typedef struct { SQLDBTYP sqldb; //database type union { POSPTR *psql; //postgreSQL reference/ - MYSPTR *msql; //MySQL Reference + MARPTR *msql; //Mariadb|MySQL Reference }db; }SQLTYP; /* diff --git a/lib/unisql.c b/lib/unimar.c similarity index 86% rename from lib/unisql.c rename to lib/unimar.c index 4661ff7..67e4124 100644 --- a/lib/unisql.c +++ b/lib/unimar.c @@ -7,7 +7,7 @@ /********************************************************/ #include -#include "unisql.h" +#include "unimar.h" /* @@ -18,16 +18,16 @@ /* postgresq SQL server. */ /* */ /********************************************************/ -SQLPTR *sql_opensql(const char *host,const char *sqlport,const char *dbname) +MARPTR *mar_opensql(const char *host,const char *sqlport,const char *dbname) { #define OPEP "unisql.c:sql_opensql," -SQLPTR *sqlptr; +MARPTR *marptr; -sqlptr=(SQLPTR *)0; +marptr=(MARPTR *)0; (void) fprintf(stderr,"%s\n","To be implemented"); -return sqlptr; +return marptr; #undef OPEP } /* @@ -39,13 +39,13 @@ return sqlptr; /* postgresql SQL server. */ /* */ /********************************************************/ -SQLPTR *sql_closesql(SQLPTR *sqlptr) +MARPTR *mar_closesql(MARPTR *marptr) { #define OPEP "sqlpos.c:sql_closesql," (void) fprintf(stderr,"%s\n","To be implemented"); -return sqlptr; +return marptr; #undef OPEP } diff --git a/lib/unimar.h b/lib/unimar.h index bdf1b89..c8beb35 100644 --- a/lib/unimar.h +++ b/lib/unimar.h @@ -1,14 +1,20 @@ // vim: smarttab tabstop=8 shiftwidth=2 expandtab /********************************************************/ /* */ -/* base level subroutine declaration */ -/* to handle MariaDB SQL request. */ +/* Base level subroutine declaration */ +/* to handle MYSQL/MARIADB SQL request. */ /* */ /********************************************************/ #ifndef UNIMAR #define UNIMAR //reference to a SQL pointer reference -typedef void MYSPTR; +typedef void MARPTR; + +//Opening a postscript database +extern MARPTR *mar_opensql(const char *host,const char *sqlport,const char *dbname); + +//closing a postscript database +extern MARPTR *mar_closesql(MARPTR *marptr); #endif diff --git a/lib/unisql.h b/lib/unisql.h deleted file mode 100644 index 0a88104..0000000 --- a/lib/unisql.h +++ /dev/null @@ -1,20 +0,0 @@ -// vim: smarttab tabstop=8 shiftwidth=2 expandtab -/********************************************************/ -/* */ -/* Base level subroutine declaration */ -/* to handle MYSQL/MARIADB SQL request. */ -/* */ -/********************************************************/ -#ifndef UNISQL -#define UNISQL - -//reference to a SQL pointer reference -typedef void SQLPTR; - -//Opening a postscript database -extern SQLPTR *sql_opensql(const char *host,const char *sqlport,const char *dbname); - -//closing a postscript database -extern SQLPTR *sql_closesql(SQLPTR *sqlptr); - -#endif