wtmp
struct wseg *wtmp;
for(wtmp = wsegs[mtmp->wormno]; wtmp; wtmp = wtmp->nseg)
if(wtmp->wx == x && wtmp->wy == y){
m_atseg = wtmp;
for(wtmp = wsegs[tmp]; wtmp; wtmp = wtmp2){
wtmp2 = wtmp->nseg;
bwrite(fd, wtmp,sizeof(struct wseg));
struct wseg *wtmp;
wheads[tmp] = wsegs[tmp] = wtmp = newseg();
mread(fd, (char *)wtmp, sizeof(struct wseg));
if(!wtmp->nseg) break;
wheads[tmp]->nseg = wtmp = newseg();
wheads[tmp] = wtmp;
struct wseg *wtmp, *wtmp2;
wtmp->nseg = 0;
struct wseg *wtmp, *whd;
wtmp = newseg();
wtmp->wx = mtmp->mx;
wtmp->wy = mtmp->my;
wtmp->nseg = 0;
(whd = wheads[tmp])->nseg = wtmp;
wheads[tmp] = wtmp;
struct wseg *wtmp;
wtmp = wsegs[tmp];
if(wtmp == wheads[tmp]) return;
if(wtmp == 0 || wtmp->nseg == 0) panic("worm_nomove?");
wsegs[tmp] = wtmp->nseg;
remseg(wtmp);
struct wseg *wtmp, *wtmp2;
for(wtmp = wsegs[tmp]; wtmp; wtmp = wtmp2){
wtmp2 = wtmp->nseg;
remseg(wtmp);
struct wseg *wtmp;
for(wtmp = wsegs[tmp]; wtmp; wtmp = wtmp->nseg)
struct wseg *wtmp = wsegs[tmp];
if(!wtmp) panic("wormsee: wtmp==0");
for(; wtmp->nseg; wtmp = wtmp->nseg)
if(!cansee(wtmp->wx,wtmp->wy) && wtmp->wdispl){
newsym(wtmp->wx, wtmp->wy);
wtmp->wdispl = 0;
pwseg(struct wseg *wtmp)
if(!wtmp->wdispl){
atl(wtmp->wx, wtmp->wy, '~');
wtmp->wdispl = 1;
struct wseg *wtmp, *wtmp2;
wtmp = wsegs[tmp];
if(wtmp->wx == x && wtmp->wy == y){
wsegs[tmp] = wtmp->nseg;
remseg(wtmp);
if(wtmp->nseg->wx == x && wtmp->nseg->wy == y){
if(tmp2) wheads[tmp2] = wtmp;
wsegs[tmp] = wtmp->nseg->nseg;
remseg(wtmp->nseg);
wtmp->nseg = 0;
mtmp2->mx = wtmp->wx;
mtmp2->my = wtmp->wy;
remseg(wtmp);
wtmp2 = wtmp->nseg;
if(!tmp2) remseg(wtmp);
wtmp = wtmp2;
} while(wtmp->nseg);
remseg(struct wseg *wtmp)
if(wtmp->wdispl)
newsym(wtmp->wx, wtmp->wy);
free(wtmp);
struct wseg *wtmp;
wheads[tmp] = wsegs[tmp] = wtmp = newseg();
wtmp->wx = mtmp->mx;
wtmp->wy = mtmp->my;
wtmp();
void wtmp(void);