first step on separating drivers from library
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#endif
|
||||
#include "Yap.h"
|
||||
#include "myddas.h"
|
||||
#include "myddas_structs.h"
|
||||
#ifdef MYDDAS_STATS
|
||||
#include "myddas_statistics.h"
|
||||
#endif
|
||||
@@ -19,7 +18,7 @@ myddas_init_initialize_myddas(void){
|
||||
/* We cannot call MYDDAS_MALLOC were because the global
|
||||
register isn't yet initialized */
|
||||
global = (MYDDAS_GLOBAL) malloc (sizeof(struct myddas_global));
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUGX
|
||||
printf ("MALLOC %p %s %d\n",global,__FILE__,__LINE__);
|
||||
#endif
|
||||
global->myddas_top_connections = NULL;
|
||||
@@ -63,9 +62,9 @@ myddas_init_initialize_connection(void *conn,void *enviromment,
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
new->api = api;
|
||||
new->predicates=NULL;
|
||||
new->connection=conn;
|
||||
new->api = api;
|
||||
new->odbc_enviromment=enviromment;
|
||||
|
||||
/* It saves n queries, doing at once n+1 queries */
|
||||
@@ -88,30 +87,5 @@ myddas_init_initialize_connection(void *conn,void *enviromment,
|
||||
return new;
|
||||
}
|
||||
|
||||
MYDDAS_UTIL_PREDICATE
|
||||
myddas_init_initialize_predicate(char *pred_name, int pred_arity,
|
||||
char *pred_module, MYDDAS_UTIL_PREDICATE next){
|
||||
CACHE_REGS
|
||||
MYDDAS_UTIL_PREDICATE new = NULL;
|
||||
MYDDAS_MALLOC(new,struct myddas_list_preds);
|
||||
|
||||
if (new == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
new->pred_name=pred_name;
|
||||
new->pred_arity=pred_arity;
|
||||
new->pred_module=pred_module;
|
||||
|
||||
/* List integrity */
|
||||
new->next=next;
|
||||
new->previous=NULL;
|
||||
/* If there's already at least one node
|
||||
on the list */
|
||||
if (next != NULL)
|
||||
next->previous=new;
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user