CUT_C and MYDDAS support for 64 bits architectures

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1564 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
tiagosoares
2006-03-09 15:52:06 +00:00
parent 1f5f6c7f12
commit 6f409cb962
20 changed files with 279 additions and 265 deletions

View File

@@ -273,7 +273,7 @@ db_stats(Connection,List):-
%compatibility
db_sql_select(Connection,SQL,LA):-
db_sql(Connection,SQL.LA).
db_sql(Connection,SQL,LA).
db_sql(SQL,LA):-
db_sql(myddas,SQL,LA).

View File

@@ -138,7 +138,7 @@ db_view(Connection,PredName,DbGoal) :-
% get arity of projection term
functor(PredName,ViewName,Arity),
db_module(Module),
%not c_db_check_if_exists_pred(ViewName,Arity,Module),
not c_db_check_if_exists_pred(ViewName,Arity,Module),
% This copy_term is done to prevent the unification
% with top-level variables A='var('A')' error

View File

@@ -21,12 +21,13 @@
:- use_module(myddas_util_predicates,[
'$make_a_list'/2,
'$check_fields'/2
'$check_fields'/2,
'$check_list_on_list'/2
]).
:- use_module(lists,[
is_list/1
]).
]).
'$error_checks'(db_abolish(ModulePredName,Arity)):-!,
@@ -104,10 +105,14 @@
nonvar(Password),
atom(Connection),
get_value(Connection,[]). % Nao pode ter nenhum valor atribuido
'$error_checks'(db_view(Connection,PredName,DbGoal)) :- !,
'$error_checks'(db_view(Connection,Pred,DbGoal)) :- !,
atom(Connection),
nonvar(DbGoal),
nonvar(PredName).
nonvar(Pred),
nonvar(DbGoal),
Pred =.. [_|PredArgs],
DbGoal =.. [_|DbGoalArgs],
'$check_list_on_list'(PredArgs,DbGoalArgs).
'$error_checks'(db_import(Connection,RelationName,PredName)) :- !,
atom(Connection),
atom(RelationName),

View File

@@ -15,6 +15,8 @@
* *
*************************************************************************/
#ifdef MYDDAS_TOP_LEVEL
:- module(myddas_top_level,[
db_top_level/5,
db_datalog_select/3
@@ -107,3 +109,5 @@ db_datalog_select(Connection,LA,DbGoal):-
% set_value(Connection,Con),
% db_my_result_set(Mode),
% c_db_top_level(Con,Mode).
#endif MYDDAS_TOP_LEVEL

View File

@@ -37,7 +37,8 @@
'$where_exists'/2,
'$build_query'/5,
'$assert_facts'/2,
'$lenght'/2
'$lenght'/2,
'$check_list_on_list'/2
]).
:- use_module(myddas,[
@@ -408,3 +409,13 @@
'$lenght'([_|T],Sum):-
'$lenght'(T,Num),
Sum is Num + 1.
'$check_list_on_list'([],_).
'$check_list_on_list'([H|T],DbGoalArgs) :-
'$member_strick'(H,DbGoalArgs),
'$check_list_on_list'(T,DbGoalArgs).
'$member_strick'(Element1, [Element2|_]) :-
Element1 == Element2,!.
'$member_strick'(Element, [_|Rest]) :-
'$member_strick'(Element, Rest).