Home | History | Annotate | Download | only in worms

Lines Matching defs:CO

203 	int CO, LI, last, bottom, ch, number, trail;
378 CO = COLS;
381 if (CO == 0 || LI == 0) {
383 errx(1, "screen must be a rectangle, not (%dx%d)", CO, LI);
388 * that a LI * CO * sizeof(short *) cannot overflow an int
390 if (CO >= (int)(INT_MAX / (2 * sizeof(short *)) / LI)) {
392 errx(1, "screen (%dx%d) too large for worms", CO, LI);
395 /* now known that LI*CO cannot overflow an int => also not a long */
397 if (LI < 3 || CO < 3 || LI * CO < 40) {
404 errx(1, "screen (%dx%d) too small for worms", CO, LI);
408 maxlength = minlength + (CO * LI / 40);
410 ul = (unsigned long)CO * LI;
420 maxlength = CO * LI / 3 / number;
423 ul = (CO * LI) / ((minlength + maxlength)/2 * 3);;
435 last = CO - 1;
438 if (!(ip = calloc(LI * CO, sizeof(short))))
444 ip += CO;
481 for (x = CO; --x >= 0;) {