|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1980, 1986 Regents of the University of California. ! 3: * All rights reserved. The Berkeley software License Agreement ! 4: * specifies the terms and conditions for redistribution. ! 5: */ ! 6: ! 7: #ifndef lint ! 8: static char sccsid[] = "@(#)subr.c 6.1 (Berkeley) 8/29/86"; ! 9: #endif not lint ! 10: ! 11: ! 12: #include "grnplot.h" ! 13: ! 14: ! 15: /*--------------------------------------------------------- ! 16: * This local routine outputs an x-y coordinate pair in the standard ! 17: * format required by the grn file. ! 18: * ! 19: * Results: None. ! 20: * ! 21: * Side Effects: ! 22: * ! 23: * Errors: None. ! 24: *--------------------------------------------------------- ! 25: */ ! 26: outxy(x, y) ! 27: int x, y; /* The coordinates to be output. Note: ! 28: * these are world coordinates, not screen ! 29: * ones. We scale in this routine. ! 30: */ ! 31: { ! 32: printf("%.2f %.2f\n", (x - xbot)*scale,(y - ybot)*scale); ! 33: } ! 34: ! 35: outcurxy() ! 36: { ! 37: outxy(curx,cury); ! 38: } ! 39: ! 40: startvector() ! 41: { ! 42: if (!ingrnfile) erase(); ! 43: if (invector) return; ! 44: invector = 1; ! 45: printf("VECTOR\n"); ! 46: outcurxy(); ! 47: } ! 48: ! 49: endvector() ! 50: { ! 51: if (!invector) return; ! 52: invector = 0; ! 53: printf("*\n%d 0\n0\n",linestyle); ! 54: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.