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