convert an x,y pair into a direction code */
| 3844 | |
| 3845 | /* convert an x,y pair into a direction code */ |
| 3846 | int |
| 3847 | xytodir(int x, int y) |
| 3848 | { |
| 3849 | int dd; |
| 3850 | |
| 3851 | for (dd = 0; dd < N_DIRS; dd++) |
| 3852 | if (x == xdir[dd] && y == ydir[dd]) |
| 3853 | return dd; |
| 3854 | return DIR_ERR; |
| 3855 | } |
| 3856 | |
| 3857 | /* convert a direction code into an x,y pair */ |
| 3858 | void |
no outgoing calls