2 files changed
+22
-20
No files matched your search
@@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
NOTE: this entry might not compile with modern systems.
|
|
||||||
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that it
|
||||||
|
will work with modern systems. Thank you Cody for your assistance!
|
||||||
|
|
||||||
|
|
||||||
### To run
|
### To run
|
||||||
@@ -34,7 +36,7 @@ This program is also an example of data abstraction. The X array is
|
|||||||
after initialization hidden by the well defined macros t, u and F.
|
after initialization hidden by the well defined macros t, u and F.
|
||||||
|
|
||||||
This program is highly portable as it runs on a "Notebook" size SPARC.
|
This program is highly portable as it runs on a "Notebook" size SPARC.
|
||||||
This program will not work on machines with sizeof(int)!=sizeof(void *).
|
This program will not work on machines with `sizeof(int)!=sizeof(void *)`.
|
||||||
|
|
||||||
Copyright (c) 1993, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1993, Landon Curt Noll & Larry Bassel.
|
||||||
All Rights Reserved. Permission for personal, educational or non-profit use is
|
All Rights Reserved. Permission for personal, educational or non-profit use is
|
||||||
|
|||||||
+18
-18
@@ -1,22 +1,22 @@
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
G long i,j
|
#define G long i,j
|
||||||
K case
|
#define K case
|
||||||
R return 0
|
#define R return 0
|
||||||
S( x,y) for(x=0; x<y; x++)
|
#define S( x,y) for(x=0; x<y; x++)
|
||||||
I S(i,10
|
#define I S(i,10
|
||||||
z I-6)B[t][u
|
#define z I-6)B[t][u
|
||||||
t (X[m].b[i].i+g)
|
#define t (X[m].b[i].i+g)
|
||||||
u (X[m].b[i].j+l)
|
#define u (X[m].b[i].j+l)
|
||||||
M( x,y) XFillRectangles(D,p,x,a,y);
|
#define M( x,y) XFillRectangles(D,p,x,a,y);
|
||||||
s B[i][j
|
#define s B[i][j
|
||||||
W =XCreateGC(D,p,4,L)
|
#define W =XCreateGC(D,p,4,L)
|
||||||
E( W,_) k=0; I)S(j,22)if(W s]){ a[k].x=i*20; a[k].y=j*20+30; a[k].w=a[k].h=_; k++; }M(
|
#define E( W,_) k=0; I)S(j,22)if(W s]){ a[k].x=i*20; a[k].y=j*20+30; a[k].w=a[k].h=_; k++; }M(
|
||||||
A( W,_) &&!B[W]; if(!j){ z]=1; R; } else{ N(m); _; v(0); }
|
#define A( W,_) &&!B[W]; if(!j){ z]=1; R; } else{ N(m); _; v(0); }
|
||||||
Q ]=0; I-6&&j)j=
|
#define Q ]=0; I-6&&j)j=
|
||||||
F I-6)B[X[w].b[i].i+g][X[w].b[i].j+l
|
#define F I-6)B[X[w].b[i].i+g][X[w].b[i].j+l
|
||||||
e( x) break; K x:q(c,j,x);
|
#define e( x) break; K x:q(c,j,x);
|
||||||
H (m){ G; I-6){ a[i].x=t*20; a[i].y=u*20+30; a[i].w=a[i].h=
|
#define H (m){ G; I-6){ a[i].x=t*20; a[i].y=u*20+30; a[i].w=a[i].h=
|
||||||
v( _) d(m); z+_]=1; R+1;
|
#define v( _) d(m); z+_]=1; R+1;
|
||||||
struct{
|
struct{
|
||||||
short x,y,w,h;
|
short x,y,w,h;
|
||||||
} a[220],C;
|
} a[220],C;
|
||||||
|
|||||||
Reference in new issue
Block a user