1
2 #include <stdio.h>
3
4 typedef struct { short ot; short ob; short nt; short nb; } Stuff;
5
PaintThumb(Stuff * w)6 void PaintThumb( Stuff* w )
7 {
8 short oldtop = w->ot;
9 short oldbot = w->ob;
10 short newtop = w->nt;
11 short newbot = w->nb;
12
13 if (newtop < oldtop) { fprintf(stderr,"case1\n");
14 // FillArea(w, newtop, XawMin(newbot, oldtop), 1);
15 }
16 if (newtop > oldtop) { fprintf(stderr,"case2\n");
17 // FillArea(w, oldtop, XawMin(newtop, oldbot), 0);
18 }
19 if (newbot < oldbot) { fprintf(stderr,"case3\n");
20 // FillArea(w, XawMax(newbot, oldtop), oldbot, 0);
21 }
22 if (newbot > oldbot) { fprintf(stderr,"case4\n");
23 // FillArea(w, XawMax(newtop, oldbot), newbot, 1);
24 }
25 }
26
main(void)27 int main ( void )
28 {
29 Stuff st;
30 st.ot = -332;
31 st.ob = -301;
32 st.nt = 0;
33 st.nb = 31;
34 PaintThumb( &st );
35 return 0;
36 }
37