#include //#define _ulImage_ allocimage(display, Rect(0,0,1,1), screen->chan, 1, DBlack) #include #include typedef struct Int Int; struct Str { char *s; }; typedef struct Str Str; struct Int { int *x; }; typestr Point WindowsXP; typestr Int INTER; typestr Str STR; typestr Image Img; int Point_eq_(Point a, Point b) { return memcmp(&a,&b, sizeof a) == 0; } //Image* Point Point_add_(Point a, Point b) { Point r; r.x = a.x + b.x; r.y = a.y + b.y; return r; } int Str_eq_(Str s, Str t) { return strcmp(s.s,t.s); } Int Intr_eq_(Int a, Int b) { return a; } Image _ulImage_(ulong u) { return *allocimage(display, Rect(0,0,1,1), screen->chan, 1, u); } void main(int argc, char *argv[]) { initdraw(nil,nil,nil); Image *i; char *p; Image *x; int n; Str t1, t2, t3; t1.s = "test"; t2.s = "test"; t3.s = "test2"; x = malloc(sizeof *x); *x = (ulong)DBlack; draw(screen, screen->r, x, nil, ZP); // print("strcmp %s %s: %d\n", t1.s, t2.s, t1 == t2); // print("strcmp %s %s: %d\n", t1.s, t3.s, t1 == t3); flushimage(display, 1); sleep(2000); }