|
|
1.1 root 1: #ifndef MUX_H
2: #define MUX_H MUX_H
3: #ifndef LAYER_H
4: #include <CC/layer.h>
5: #endif
6: #ifndef JERQPROC_H
7: #include <CC/jerqproc.h>
8: #endif
9:
10: #define WAIT 0
11: #define NOWAIT 1
12:
13: extern Bitmap *Jdisplayp;
14: #define display (*Jdisplayp)
15: typedef int (*ptr_fint)();
16: #define Sys ((ptr_fint *)0x0071e700)
17: class Proc;
18: #define P (*((struct Proc **)0x0071e700))
19: class Font;
20:
21: /*
22: * Cast macros
23: */
24: #define Cast(t, x) ((t (*)(...))Sys[x])
25: #define TPoint(x) Cast(Point, x)
26: #define TRectangle(x) Cast(Rectangle, x)
27: #define Tint(x) Cast(int, x)
28: #define TpBitmap(x) Cast(Bitmap *, x)
29: #define TpLayer(x) Cast(Layer *, x)
30: #define TpWord(x) Cast(Word *, x)
31: #define Tpchar(x) Cast(char *, x)
32: #define Tvoid(x) Cast(void, x)
33: #define TpProc(x) Cast(struct Proc *, x)
34: #define IPoint(x) (*Cast(Point, x))
35: #define IRectangle(x) (*Cast(Rectangle, x))
36: #define Iint(x) (*Cast(int, x))
37: #define Ilong(x) (*Cast(long, x))
38: #define IpBitmap(x) (*Cast(Bitmap *, x))
39: #define IpTexture(x) (*Cast(Texture *, x))
40: #define IpLayer(x) (*Cast(Layer *, x))
41: #define IpWord(x) (*Cast(Word *, x))
42: #define Ipchar(x) (*Cast(char *, x))
43: #define Ivoid(x) (*Cast(void, x))
44: #define IpProc(x) (*Cast(struct Proc *, x))
45:
46: /*
47: * System calls
48: */
49: #undef BonW
50: #undef WonB
51: /* Thank Ken for Regular Expressions */
52: #define add(p, q) IPoint(2)(p, q) /*'add'*/
53: #define addr(b, p) IpWord(3)(b, p) /*'addr'*/
54: #define alarm(n) Ivoid(4)(n) /*'alarm'*/
55: #define alloc(u) Ipchar(5)(u) /*'Ualloc'*/
56: #define balloc(r) IpBitmap(6)(r) /*'Uballoc'*/
57: #define bfree(p) Ivoid(7)(p) /*'bfree'*/
58: #define bitblt(sb, r, db, p, f) Ivoid(8)(sb, r, db, p, f) /*'Ubitblt'*/
59: #define cursallow() Ivoid(9)() /*'Ucursallow'*/
60: #define cursinhibit() Ivoid(10)() /*'Ucursinhibit'*/
61: #define cursset(p) Ivoid(11)(p) /*'Ucursset'*/
62: #define cursswitch(c) IpTexture(12)(c) /*'Ucursswitch'*/
63: #define debug() IpProc(13)() /*'debug'*/
64: #define dellayer(l) Iint(14)(l) /*'dellayer'*/
65: #define div(p, n) IPoint(15)(p, n) /*'div'*/
66: #define eqrect(r, s) Iint(16)(r, s) /*'eqrect'*/
67: #define exit() Ivoid(17)() /*'Uexit'*/
68: #define free(p) Ivoid(18)(p) /*'free'*/
69: #define gcalloc(n, w) Ipchar(19)(n, w, P) /*'realgcalloc'*/
70: #define gcfree(s) Ivoid(20)(s) /*'gcfree'*/
71: #define getrect(n) IRectangle(79)(n) /*'getrect'*/
72: #define inset(r, n) IRectangle(22)(r, n) /*'inset'*/
73: #define Jcursallow() Ivoid(23)() /*'cursallow'*/
74: #define Jcursinhibit() Ivoid(24)() /*'cursinhibit'*/
75: #define kbdchar() Iint(25)() /*'Ukbdchar'*/
76: #define lpoint(b, p, f) Ivoid(26)(b, p, f) /*'lpoint'*/
77: #define lrectf(b, r, f) Ivoid(27)(b, r, f) /*'lrectf'*/
78: #define lsegment(b, p, q, f) Ivoid(28)(b, p, q, f) /*'lsegment'*/
79: #define ltexture(b, r, t, f) Ivoid(29)(b, r, t, f) /*'ltexture'*/
80: #define menuhit(m, n) Iint(30)(m, n) /*'menuhit'*/
81: #define mul(p, n) IPoint(31)(p, n) /*'mul'*/
82: #define muxnewwind(p,c) Ivoid(32)(p,c) /*'muxnewwind'*/
83: #define nap(s) Ivoid(33)(s) /*'nap'*/
84: #define newlayer(r) IpLayer(34)(r) /*'newlayer'*/
85: #define newproc(f) IpProc(35)(f) /*'Unewproc'*/
86: #define newwindow(f) Ivoid(36)(f) /*'newwindow'*/
87: #define own() Iint(37)() /*'Uown'*/
88: #define point(l, p, f) Ivoid(38)(l, p, f) /*'Upoint'*/
89: #define ptinrect(p, r) Iint(39)(p, r) /*'ptinrect'*/
90: #define raddp(r, p) IRectangle(40)(r, p) /*'raddp'*/
91: #define rcvchar() Iint(41)() /*'Urcvchar'*/
92: #define realtime() Ilong(42)() /*'realtime'*/
93: #define rectXrect(r, s) Iint(43)(r, s) /*'rectXrect'*/
94: #define rectclip(pr, r) Iint(44)(pr, r) /*'rectclip'*/
95: #define rectf(l, r, f) Ivoid(45)(l, r, f) /*'Urectf'*/
96: #define request(r) Iint(46)(r) /*'Urequest'*/
97: #define rsubp(r, p) IRectangle(47)(r, p) /*'rsubp'*/
98: #define screenswap(b, r, s) Ivoid(48)(b, r, s) /*'Uscreenswap'*/
99: #define segment(l, p, q, f) Ivoid(49)(l, p, q, f) /*'Usegment'*/
100: #define sendchar(c) Ivoid(50)(c) /*'Usendchar'*/
101: #define sendnchars(n, p) Ivoid(51)(n,p) /*'sendnchars'*/
102: #define sleep(s) Ivoid(52)(s) /*'sleep'*/
103: #define XXXXXXXX(r) Ivoid(53)(r, 1) /*'0'*/
104: #define string(F, s, b, p, f) IPoint(54)(F, s, b, p, f) /*'string'*/
105: #define strwidth(F, s) Iint(55)(F,s) /*'strwidth'*/
106: #define sub(p, q) IPoint(56)(p, q) /*'sub'*/
107: #define texture(l, r, m, f) Ivoid(57)(l, r, m, f) /*'Utexture'*/
108: #define tolayer(l) Ivoid(58)(l) /*'tolayer'*/
109: #define upfront(l) Iint(59)(l) /*'upfront'*/
110: #define wait(n) Iint(60)(n) /*'Uwait'*/
111: #define kill(i) Iint(61)(i, P) /*'muxkill'*/
112: #define setmuxbuf(s) Ivoid(62)(s) /*'setmuxbuf'*/
113: #define getmuxbuf(s) Ivoid(63)(s) /*'getmuxbuf'*/
114: #define strinsure(s, n) Ivoid(64)(s, n, P) /*'insure'*/
115: #define GCalloc(n, p) Ivoid(65)(n, p, P) /*'GCalloc'*/
116: #define movstring(i, s, d) Ivoid(66)(i, s, d) /*'movstring'*/
117: #define strinsert(p, i, q) Ivoid(67)(p, i, q) /*'insstring'*/
118: #define strdelete(p, i, j) Ivoid(68)(p, i, j) /*'delstring'*/
119: #define frselect(f, pt) Ivoid(69)(f, pt) /*'frselect'*/
120: #define fralloc(r, m) IpFrame(70)(r, m) /*'fralloc'*/
121: #define frsetrects(f, r) Ivoid(71)(f, r) /*'frsetrects'*/
122: #define frinit(f) Ivoid(72)(f) /*'frinit'*/
123: #define frfree(f) Ivoid(73)(f) /*'frfree'*/
124: #define ptofchar(f, n) IPoint(74)(f, n) /*'ptofchar'*/
125: #define charofpt(f, p) Iint(75)(f, p) /*'charofpt'*/
126: #define border(p, r, i, c) Iint(76)(p, r, i, c) /*'border'*/
127: #define getproctab() IpProc(77)() /*'getproctab'*/
128: #define lbitblt(sb, r, db, p, f) Ivoid(78)(sb, r, db, p, f) /*'lbitblt'*/
129: #define getrect(n) IRectangle(79)(n) /*'getrect'*/
130: #define getrectb(n) IRectangle(80)(n) /*'getrectb'*/
131: #define qputc(q, w) Iint(81)(q, w) /*'qputc'*/
132: #define qgetc(q) Iint(82)(q) /*'qgetc'*/
133: #define qputstr(q, s) Iint(83)(q, s) /*'qputstr'*/
134: #define qclear(q) Ivoid(84)(q) /*'qclear'*/
135: #define jstrwidth(s) Iint(85)(s) /*'jstrwidth'*/
136: #define getproc() IpProc(86)() /*'getproc'*/
137: #define layerop Ivoid(87) /*'layerop'*/
138: #define putname(s,w) Iint(88)(s,w) /*'putname'*/
139: #define getname(s,w) IpProc(89)(s,w) /*'getname'*/
140: #endif MUX_H
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.