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