annotate cppl.c @ 21:8fb7b6f55b7e

update tags
author convert-repo
date Fri, 07 Nov 2008 20:36:40 +0000
parents 07d6c4c5654b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
1 /*
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
2 Copyright (C) 1988, Shinji Kono
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
3 Everyone is permitted to copy and distribute verbatim copies
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
4 of this license, but changing it is not allowed. You can also
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
5 use this wording to make the terms for other programs.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
6
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
7 send your comments to kono@csl.sony.co.jp
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
8 */
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
9 /*
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
10 support routine for compatibilities
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
11 */
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
12
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
13 #if defined(SBPROLOG) || defined(XSB)
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
14 lite_start :- ['op.pl'],
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
15 assert((define(_,_):-fail)),
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
16 assert((verbose:-fail)),
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
17 assert((variable(_):-fail)).
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
18
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
19 start :- lite_start,
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
20 load('../Tokio/tokio'),
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
21 ['../Tokio/ts.pl'],
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
22 com('../Tokio/tm.pl',user),
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
23 r_header.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
24
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
25
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
26 r_cputime(X) :- cputime(X0),X is X0/1000.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
27 ttyflush.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
28 #endif
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
29
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
30 #if defined(SBPROLOG)
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
31
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
32 '\+'(X) :- call(X),!,fail.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
33 '\+'(_).
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
34
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
35 #endif
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
36
20
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
37 #if ! defined(XSB) && ! defined(SICSTUSV4)
2
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
38 A '\=' A :-!,fail.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
39 _ '\=' _.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
40 #endif
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
41
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
42 #if defined (XSB)
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
43 ':-'(X) :- call(X),!;true.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
44
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
45 #endif
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
46
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
47 #if defined(CPROLOG)
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
48 :-abolish(r_cputime,1).
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
49 r_cputime(X) :- X is cputime.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
50 #endif
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
51
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
52 #if defined(SICSTUS)
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
53 r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
54 #if defined(SICSTUSV3)
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
55 A '\=' A :-!,fail.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
56 _ '\=' _.
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
57 #endif
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
58
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
59 #endif
20
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
60 #if defined(SICSTUSV4)
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
61 r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000.
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
62 #endif
2
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
63
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
64 #if defined(CPROLOG)
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
65
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
66
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
67 #if CPROLOG15
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
68 term_expansion(X,X).
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
69 :-unknown(X,trace).
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
70 #endif
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
71
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
72 :- (ttyflush;assert((ttyflush))).
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
73 #endif
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
74
20
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
75 #if !defined(SICSTUSV4)
2
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
76 append([],X,X).
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
77 append([H|X],Y,[H|Z]) :- append(X,Y,Z).
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
78
20
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
79 member(H,[H|_]).
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
80 member(H,[_|T]):-member(H,T).
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
81
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
82 #endif
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
83
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
84 #if !defined(SICSTUSV4)
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
85 r_abolish(A,B) :- abolish(A,B).
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
86 #else
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
87 r_abolish(A,B) :- abolish(A/B).
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
88
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
89 put(C) :- char_code(Char,C),put_char(Char).
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
90
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
91 ttyflush :- flush_output.
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
92
07d6c4c5654b SICStus v4 (ISO prolog syntax)
kono
parents: 2
diff changeset
93 #endif
2
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
94
1c57a78f1d98 Initial revision
kono
parents:
diff changeset
95 /* end */