int type2() { prost square; clearpoint(); putbox(0,0,0); putbox(punkty[0].x2, 0, 1); putbox(0, punkty[0].y2, 2); putbox(punkty[2].x2, (punkty[0].y2<punkty[1].y2?punkty[0].y2:punkty[1].y2), 3); square=countsize(); return square.h*square.w; }
int type1() { prost square; clearpoint(); putbox(0,0,0); putbox(punkty[0].x2, 0, 1); putbox(punkty[1].x2, 0, 2); putbox(0, punkty[0].y2, 3); square=countsize(); return square.h*square.w; }
void pstext(int x, char *s) { char *tmp = emalloc((int) strlen(s)+1); strcpy(tmp, s); if (depth == 0) { I[x] = tmp; } else { if (depth >= TotSteps || ldepth >= TotSteps) { fprintf(stderr, "spin: error: max nr of %d steps exceeded\n", TotSteps); fatal("use -uN to limit steps", (char *) 0); } putbox(x); D[depth] = ldepth; R[ldepth] = depth; L[ldepth] = tmp; ldepth += 2; } }
void pstext(int x, char *s) { char *tmp = emalloc((int) strlen(s)+1); strcpy(tmp, s); if (depth == 0) I[x] = tmp; else { putbox(x); if (depth >= TotSteps || ldepth >= TotSteps) { fprintf(stderr, "max nr of %d steps exceeded\n", TotSteps); fatal("aborting", (char *) 0); } D[depth] = ldepth; R[ldepth] = depth; L[ldepth] = tmp; ldepth += 2; } }