view cppl.c @ 21:8fb7b6f55b7e

update tags
author convert-repo
date Fri, 07 Nov 2008 20:36:40 +0000 (2008-11-07)
parents 07d6c4c5654b
children
line wrap: on
line source
/*
 Copyright (C) 1988, Shinji Kono 
 Everyone is permitted to copy and distribute verbatim copies
 of this license, but changing it is not allowed.  You can also
 use this wording to make the terms for other programs.

 send your comments to kono@csl.sony.co.jp
*/
/* 
   support routine for compatibilities
   */

#if defined(SBPROLOG) || defined(XSB)
lite_start :- ['op.pl'],
	assert((define(_,_):-fail)),
	assert((verbose:-fail)),
	assert((variable(_):-fail)).

start :- lite_start,
	load('../Tokio/tokio'),
	['../Tokio/ts.pl'],
	com('../Tokio/tm.pl',user),
	r_header.


r_cputime(X) :- cputime(X0),X is X0/1000.
ttyflush.
#endif

#if defined(SBPROLOG)

'\+'(X) :- call(X),!,fail.
'\+'(_).

#endif

#if ! defined(XSB) && ! defined(SICSTUSV4)
A '\=' A :-!,fail.
_ '\=' _.
#endif

#if defined (XSB)
':-'(X) :- call(X),!;true.

#endif

#if defined(CPROLOG) 
:-abolish(r_cputime,1).
r_cputime(X) :- X is cputime.
#endif

#if defined(SICSTUS) 
r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000.
#if defined(SICSTUSV3) 
A '\=' A :-!,fail.
_ '\=' _.
#endif

#endif
#if defined(SICSTUSV4) 
r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000.
#endif

#if defined(CPROLOG) 


#if CPROLOG15
term_expansion(X,X).
:-unknown(X,trace).
#endif

:- (ttyflush;assert((ttyflush))).
#endif

#if !defined(SICSTUSV4)
append([],X,X).
append([H|X],Y,[H|Z]) :- append(X,Y,Z).

member(H,[H|_]).
member(H,[_|T]):-member(H,T).

#endif

#if !defined(SICSTUSV4)
r_abolish(A,B) :- abolish(A,B).
#else
r_abolish(A,B) :- abolish(A/B).

put(C) :- char_code(Char,C),put_char(Char).

ttyflush :- flush_output.

#endif

/* end  */