xref: /csrg-svn/lib/libplot/t4014/label.c (revision 48524)
1*48524Sbostic /*-
2*48524Sbostic  * Copyright (c) 1983 The Regents of the University of California.
3*48524Sbostic  * All rights reserved.
4*48524Sbostic  *
5*48524Sbostic  * %sccs.include.proprietary.c%
6*48524Sbostic  */
7*48524Sbostic 
813348Ssam #ifndef lint
9*48524Sbostic static char sccsid[] = "@(#)label.c	4.2 (Berkeley) 04/22/91";
10*48524Sbostic #endif /* not lint */
1113348Ssam 
1213348Ssam #define N 0104
1313348Ssam #define E 0101
1413348Ssam #define NE 0105
1513348Ssam #define S 0110
1613348Ssam #define W 0102
1713348Ssam #define SW 0112
1813348Ssam /*	arrange by incremental plotting that an initial
1913348Ssam  *	character such as +, X, *, etc will fall
2013348Ssam  *	right on the point, and undo it so that further
2113348Ssam  *	labels will fall properly in place
2213348Ssam  */
2313348Ssam char lbl_mv[] = {
2413348Ssam 	036,040,S,S,S,S,S,S,SW,SW,SW,SW,SW,SW,SW,SW,SW,SW,037,0
2513348Ssam };
2613348Ssam char lbl_umv[] = {
2713348Ssam 	036,040,N,N,N,N,N,N,NE,NE,NE,NE,NE,NE,NE,NE,NE,NE,037,0
2813348Ssam };
2913348Ssam label(s)
3013348Ssam char *s;
3113348Ssam {
3213348Ssam 	register i,c;
3313348Ssam 	for(i=0; c=lbl_mv[i]; i++)
3413348Ssam 		putch(c);
3513348Ssam 	for(i=0; c=s[i]; i++)
3613348Ssam 		putch(c);
3713348Ssam 	for(i=0; c=lbl_umv[i]; i++)
3813348Ssam 		putch(c);
3913348Ssam }
40