Skip to content

Commit eb08719

Browse files
committed
require pc_portray to be set
1 parent b3a6df0 commit eb08719

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

libraries/logicmoo_utils/prolog/logicmoo/pretty_clauses.pl

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@
630630
%pc_portray(X):- is_list(X),print_tree_unit(X).
631631

632632
pc_portray(Term):- var(Term),!,fail.
633+
pc_portray(_):- \+ nb_current(pc_portray,true), \+ current_prolog_flag(pc_portray,true), !, fail.
633634
pc_portray(Term):- atom(Term), exists_file_safe(Term),public_file_link(Term,Public),write_q(Public).
634635
pc_portray(Term:L):- integer(L),atom(Term), exists_file_safe(Term),public_file_link(Term:L,Public),write_q(Public).
635636
pc_portray(mfl4(M,F,Term,L)):- integer(L),atom(Term), exists_file_safe(Term),public_file_link(Term:L,Public),write_q(mfl4(M,F,Public,L)).
@@ -901,21 +902,21 @@
901902
/*
902903
903904
_________________________________________________________________________
904-
| Copyright (C) 1982 |
905-
| |
906-
| David Warren, |
907-
| SRI International, 333 Ravenswood Ave., Menlo Park, |
908-
| California 94025, USA; |
909-
| |
910-
| Fernando Pereira, |
911-
| Dept. of Architecture, University of Edinburgh, |
912-
| 20 Chambers St., Edinburgh EH1 1JZ, Scotland |
913-
| |
914-
| This program may be used, copied, altered or included in other |
915-
| programs only for academic purposes and provided that the |
916-
| authorship of the initial program is aknowledged. |
917-
| Use for commercial purposes without the previous written |
918-
| agreement of the authors is forbidden. |
905+
| Copyright (C) 1982 |
906+
| |
907+
| David Warren, |
908+
| SRI International, 333 Ravenswood Ave., Menlo Park, |
909+
| California 94025, USA; |
910+
| |
911+
| Fernando Pereira, |
912+
| Dept. of Architecture, University of Edinburgh, |
913+
| 20 Chambers St., Edinburgh EH1 1JZ, Scotland |
914+
| |
915+
| This program may be used, copied, altered or included in other |
916+
| programs only for academic purposes and provided that the |
917+
| authorship of the initial program is aknowledged. |
918+
| Use for commercial purposes without the previous written |
919+
| agreement of the authors is forbidden. |
919920
|_________________________________________________________________________|
920921
921922
*/
@@ -2023,20 +2024,20 @@
20232024
( (wots(S,write_q([A|R])),atom_concat_safety('[',MR,S),atom_concat_safety(M,']',MR), write(M))->true
20242025
; (write_simple(A), write_simple_each(Sep,R))).
20252026

2026-
%% between_down(+Start, ?Count, +End) is nondet.
2027+
%% between_down(+Start, ?Count, +End) is nondet.
20272028
%
2028-
% Similar to between/3, but can count down if Start > End.
2029+
% Similar to between/3, but can count down if Start > End.
20292030

20302031
between_down(Start, End, Count) :-
2031-
Start =< End, !,
2032-
between(Start, End, Count).
2032+
Start =< End, !,
2033+
between(Start, End, Count).
20332034
between_down(Start, End, Count) :-
2034-
nonvar(Count), !,
2035-
between(End, Start, Count).
2035+
nonvar(Count), !,
2036+
between(End, Start, Count).
20362037
between_down(Start, End, Count) :-
2037-
Range is Start-End,
2038-
between(0, Range, X),
2039-
Count is Start-X.
2038+
Range is Start-End,
2039+
between(0, Range, X),
2040+
Count is Start-X.
20402041

20412042
rev_append(L,R,LR):- is_list(LR),!, reverse(LR,RL),append(L1,R1,RL),reverse(L1,R),reverse(R1,L).
20422043
rev_append(L,R,LR):- append(LL,RR,LR), (var(RR);RR \= [_|_]), !, rev_append(L,R1,LL),append(R1,RR,R).
@@ -2776,9 +2777,9 @@
27762777

27772778

27782779

2779-
/*******************************
2780-
* SHARED WITH term_html.pl *
2781-
*******************************/
2780+
/*******************************
2781+
* SHARED WITH term_html.pl *
2782+
*******************************/
27822783

27832784
%! term(@Term, +Options)// is det.
27842785
%

0 commit comments

Comments
 (0)