#include "defs.h" /* routine to assign chip c to a socket */ putA(c,t) REG CHP c; INT t; { L_INT v, chv; REG SKT b, chose; chv = MAXLONG; chose = 0; scanboard(b) { if (gocheck(b,c)) continue; v = netl(c, nil(CHP), b->x - UNPLAC, b->y - UNPLAC, chv); if (v < chv) { chv = v; chose = b; } } if (chose == 0) { c->state = DEAD; return(1); } doplace(chose, c, t); minroute(c); return(0); }