From b15d9c03634412a303016dafb70abac7e2e2a257 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Mon, 23 Nov 2009 10:02:40 +0000 Subject: [PATCH] add source_location for SWI compatibility --- pl/consult.yap | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pl/consult.yap b/pl/consult.yap index b09edc0d7..805bce585 100644 --- a/pl/consult.yap +++ b/pl/consult.yap @@ -380,6 +380,10 @@ use_module(M,F,Is) :- '$skip_unix_comments'(_). +source_location(FileName, Line) :- + prolog_load_context(file, FileName), + prolog_load_context(term_position,'$stream_position'(_, Line, _, _, _)). + prolog_load_context(_, _) :- nb_getval('$consulting_file',[]), !, fail. prolog_load_context(directory, DirName) :-