WIN64 support (sill needs improvement)

This commit is contained in:
Vitor Santos Costa
2014-03-06 02:09:48 +00:00
parent 49d643d98f
commit 2c89aadb11
59 changed files with 3460 additions and 2852 deletions

View File

@@ -258,6 +258,9 @@ absolute_file_name(File,Opts,TrueFileName) :-
'$system_library_directories'(library, Dir) :-
getenv('YAPSHAREDIR', Dirs),
'$split_by_sep'(0, 0, Dirs, Dir).
'$system_library_directories'(foreign, Dir) :-
getenv('YAPLIBDIR', Dirs),
'$split_by_sep'(0, 0, Dirs, Dir).
'$system_commons_directories'(commons, Dir) :-
getenv('YAPCOMMONSDIR', Dirs),
'$split_by_sep'(0, 0, Dirs, Dir).
@@ -308,8 +311,8 @@ absolute_file_name(File,Opts,TrueFileName) :-
'$split_by_sep'(Start, Next, Dirs, Dir) :-
'$swi_current_prolog_flag'(windows, true), !,
'$split_by_sep'(Start, Next, Dirs, ';', Dir).
'$swi_current_prolog_flag'(windows, true),
'$split_by_sep'(Start, Next, Dirs, ';', Dir), !.
'$split_by_sep'(Start, Next, Dirs, Dir) :-
'$split_by_sep'(Start, Next, Dirs, ':', Dir).

View File

@@ -122,8 +122,7 @@ true :- true.
'$init_win_graphics' :-
'$undefined'(window_title(_,_), system), !.
'$init_win_graphics' :-
load_files([library(win_menu)], [silent(true)]),
( win_menu:init_win_menus -> true ; true ),
load_files([library(win_menu)], [silent(true),if(not_loaded)]),
fail.
'$init_win_graphics'.

39
pl/control.yap Normal file → Executable file
View File

@@ -21,6 +21,19 @@ forall(Cond, Action) :- \+((Cond, \+(Action))).
ignore(Goal) :- (Goal->true;true).
notrace(G) :-
strip_module(G, M, G1),
( '$$save_by'(CP),
'$debug_stop'( State ),
'$call'(G1, CP, G, M),
'$$save_by'(CP2),
(CP == CP2 -> ! ; '$debug_state'( NState ), ( true ; '$debug_restart'(NStart), fail ) ),
'$debug_restart'( State )
;
'$debug_restart'( State ),
fail
).
if(X,Y,Z) :-
yap_hacks:env_choice_point(CP0),
(
@@ -244,6 +257,32 @@ b_getval(GlobalVariable, Val) :-
it saves the importante data about current streams and
debugger state */
'$debug_state'(state(Trace, Debug, Jump, Run, SPY_GN, GList)) :-
'$init_debugger',
nb_getval('$trace',Trace),
nb_getval('$debug_jump',Jump),
nb_getval('$debug_run',Run),
'$swi_current_prolog_flag'(debug, Debug),
nb_getval('$spy_gn',SPY_GN),
b_getval('$spy_glist',GList).
'$debug_stop'( State ) :-
'$debug_state'( State ),
b_setval('$trace',off),
'$swi_set_prolog_flag'(debug, false),
b_setval('$spy_glist',[]),
'$disable_debugging'.
'$debug_restart'(state(Trace, Debug, Jump, Run, SPY_GN, GList)) :-
b_setval('$spy_glist',GList),
b_setval('$spy_gn',SPY_GN),
'$swi_set_prolog_flag'(debug, Debug),
b_setval('$debug_jump',Jump),
b_setval('$debug_run',Run),
b_setval('$trace',Trace),
'$enable_debugging'.
break :-
'$init_debugger',
nb_getval('$trace',Trace),

1
pl/modules.yap Normal file → Executable file
View File

@@ -611,6 +611,7 @@ source_module(Mod) :-
multifile(:),
nospy(:),
not(0),
notrace(0),
once(0),
phrase(2,?),
phrase(2,?,+),