1typedef struct
2{
3  int v;
4  int h;
5} Point;
6
7typedef struct
8{
9  int top, left, bottom, right;
10} Rect;
11
12int
13x_PtInRect (Point pt, Rect *r)
14{
15  return  pt.v >= r->top  && pt.v < r->bottom
16    && pt.h >= r->left && pt.h < r->right;
17}
18