| 57 | */ |
| 58 | |
| 59 | int |
| 60 | get_rect_ind(NhRect *r) |
| 61 | { |
| 62 | NhRect *rectp; |
| 63 | int lx, ly, hx, hy; |
| 64 | int i; |
| 65 | |
| 66 | lx = r->lx; |
| 67 | ly = r->ly; |
| 68 | hx = r->hx; |
| 69 | hy = r->hy; |
| 70 | for (i = 0, rectp = &rect[0]; i < rect_cnt; i++, rectp++) |
| 71 | if (lx == rectp->lx && ly == rectp->ly && hx == rectp->hx |
| 72 | && hy == rectp->hy) |
| 73 | return i; |
| 74 | return -1; |
| 75 | } |
| 76 | |
| 77 | /* |
| 78 | * Search a free rectangle that include the one given in arg |