#include "defs.h" /* read input file into core */ load() { INT i; if(board) setheap(adr(board)); Lseek(file, 0L, 0); i = read(file, adr(header), HDRSIZ); if (i != HDRSIZ || header->h_tag != PLACEHDR) { print("%E%s", "bad input file\n"); return(1); } limit = header->h_limit; board = skt(heap(limit)); if (board == skt(-1)) { print("%E%s", "not enough memory\n"); return(1); } fdelta = adr(board) - adr(header->h_board); packs = chp(adr(header->h_packs) + fdelta); chips = chp(adr(header->h_chips) + fdelta); nets = pin(adr(header->h_nets) + fdelta); Enets = pin(adr(header->h_Enets) + fdelta); vgnum = header->h_vgnum; for(i=0; i<=SS; i++) { vgpins[i] = pin(adr(header->h_vgpins[i]) + fdelta); } lbound = adr(header->h_lbound) + fdelta; i = read(file, adr(board), (int)limit); if (i==limit) { okroute = 0; cleanup(); return(0); } else{ print("%E%s", "bad input file\n"); return(1); } }