~ubuntu-branches/ubuntu/warty/kdebase/warty

« back to all changes in this revision

Viewing changes to konsole/doc/VT100/cmds.pro

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-16 04:51:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040916045145-9vr63kith3k1cpza
Tags: upstream-3.2.2
ImportĀ upstreamĀ versionĀ 3.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
?- consult('dicts.pro').
 
2
 
 
3
test :- dict(X,_), check(X), fail; true.
 
4
test1 :- findall(A,head(A,_),R), sort(R,Res), print(Res), nl, fail.
 
5
 
 
6
check([_,head]) :- !. /* TITLE             */
 
7
check([_,emus]) :- !. /* List Word         */
 
8
check([_,dflt]) :- !. /* List NumberOrWord */
 
9
check([_,sect]) :- !. /* List Word // Dotted Name */
 
10
check([_,code]) :- !. /* [ TYP, ("Char"/none/Numb), [arg, ...] ] */
 
11
check([_,text]) :- !. /* [ String/nl/ref(Sym) ... ] */
 
12
 
 
13
check([_,table,'XPS']) :- !. /* interpretation */
 
14
 
 
15
/*Other (type) tables */
 
16
/*check([_,table,_]) :- !, print(X), nl.*/
 
17
 
 
18
check(X) :- !, print(X), nl.
 
19
 
 
20
/* ----------- */
 
21
/* State: We're closer to make up a proper data model.
 
22
   Todo:
 
23
   - put the type/value definitions listed in 'test'
 
24
     to a more appropriate place.
 
25
   - clearify section material.
 
26
   - make a model and a consistency checker.
 
27
   - make a report generator.
 
28
   - integrate 'TEScreen.C' functions
 
29
*/
 
30
 
 
31
 
 
32
head(Name,Title)       :- dict([Name,head],Title).
 
33
emus(Name,Emus)        :- dict([Name,emus],Emus).
 
34
dflt(Name,Defaults)    :- dict([Name,dflt],Defaults).
 
35
sect(Name,DottedSect)  :- dict([Name,sect],DottedSect).
 
36
code(Name,Code)        :- dict([Name,code],Desc), tcode(Desc,Code).
 
37
text(Name,Text)        :- dict([Name,text],Text).
 
38
 
 
39
tcode(['PRN',none,[]],prn) :- !.
 
40
tcode(['DEL',none,[]],ctl(127)) :- !.
 
41
tcode(['CTL',Num,[]],ctl(Num)) :- !.
 
42
tcode(['ESC',Chr,[]],esc(Chr)) :- !.
 
43
tcode(['HSH',Chr,[]],esc(Chr)) :- !.
 
44
tcode(['CSI',Chr,[P,'...']],csi(Chr,list(P))) :- !.
 
45
tcode(['CSI',Chr,Parm],csi(Chr,Parm)) :- !.
 
46
tcode(['PRI',Chr,[P,'...']],pri(Chr,list(P))) :- !.
 
47
tcode(['PRI',Chr,Parm],pri(Chr,Parm)) :- !.
 
48
tcode(['SCS',none,[A,B]],scs([A,B])) :- !.
 
49
tcode(['VT5',none,[X,Y]],vt5([X,Y])) :- !.
 
50
tcode(P,P) :- writef("\n - fail\n %t \n\n",[P]).
 
51
 
 
52
pheads :-
 
53
  head(N,T),
 
54
  writef("%w - %s\n",[N,T]),
 
55
  fail; true.
 
56
 
 
57
pcodes :-
 
58
  code(N,P),
 
59
  writef("%w - %t\n",[N,P]),
 
60
  fail; true.
 
61