Lines Matching refs:wtmp

97 	struct wseg    *wtmp;  in initworm()  local
101 wheads[tmp] = wsegs[tmp] = wtmp = newseg(); in initworm()
103 wtmp->wx = mtmp->mx; in initworm()
104 wtmp->wy = mtmp->my; in initworm()
106 wtmp->nseg = 0; in initworm()
112 struct wseg *wtmp, *whd = NULL; in worm_move() local
114 wtmp = newseg(); in worm_move()
115 wtmp->wx = mtmp->mx; in worm_move()
116 wtmp->wy = mtmp->my; in worm_move()
117 wtmp->nseg = 0; in worm_move()
119 (whd = wheads[tmp])->nseg = wtmp; in worm_move()
120 wheads[tmp] = wtmp; in worm_move()
145 struct wseg *wtmp; in worm_nomove() local
147 wtmp = wsegs[tmp]; in worm_nomove()
148 if (wtmp == wheads[tmp]) in worm_nomove()
150 if (wtmp == 0 || wtmp->nseg == 0) in worm_nomove()
152 wsegs[tmp] = wtmp->nseg; in worm_nomove()
153 remseg(wtmp); in worm_nomove()
161 struct wseg *wtmp, *wtmp2; in wormdead() local
165 for (wtmp = wsegs[tmp]; wtmp; wtmp = wtmp2) { in wormdead()
166 wtmp2 = wtmp->nseg; in wormdead()
167 remseg(wtmp); in wormdead()
176 struct wseg *wtmp; in wormhit() local
179 for (wtmp = wsegs[tmp]; wtmp; wtmp = wtmp->nseg) in wormhit()
186 struct wseg *wtmp = wsegs[tmp]; in wormsee() local
187 if (!wtmp) in wormsee()
189 for (; wtmp->nseg; wtmp = wtmp->nseg) in wormsee()
190 if (!cansee(wtmp->wx, wtmp->wy) && wtmp->wdispl) { in wormsee()
191 newsym(wtmp->wx, wtmp->wy); in wormsee()
192 wtmp->wdispl = 0; in wormsee()
197 pwseg(struct wseg *wtmp) in pwseg() argument
199 if (!wtmp->wdispl) { in pwseg()
200 atl(wtmp->wx, wtmp->wy, '~'); in pwseg()
201 wtmp->wdispl = 1; in pwseg()
209 struct wseg *wtmp, *wtmp2; in cutworm() local
225 wtmp = wsegs[tmp]; in cutworm()
226 if (wtmp->wx == x && wtmp->wy == y) { in cutworm()
227 wsegs[tmp] = wtmp->nseg; in cutworm()
228 remseg(wtmp); in cutworm()
246 if (wtmp->nseg->wx == x && wtmp->nseg->wy == y) { in cutworm()
248 wheads[tmp2] = wtmp; in cutworm()
249 wsegs[tmp] = wtmp->nseg->nseg; in cutworm()
250 remseg(wtmp->nseg); in cutworm()
251 wtmp->nseg = 0; in cutworm()
256 mtmp2->mx = wtmp->wx; in cutworm()
257 mtmp2->my = wtmp->wy; in cutworm()
263 remseg(wtmp); in cutworm()
269 wtmp2 = wtmp->nseg; in cutworm()
271 remseg(wtmp); in cutworm()
272 wtmp = wtmp2; in cutworm()
273 } while (wtmp->nseg); in cutworm()
278 remseg(struct wseg *wtmp) in remseg() argument
280 if (wtmp->wdispl) in remseg()
281 newsym(wtmp->wx, wtmp->wy); in remseg()
282 free(wtmp); in remseg()