xref: /csrg-svn/lib/libplot/t4014/label.c (revision 61408)
148524Sbostic /*-
2*61408Sbostic  * Copyright (c) 1983, 1993
3*61408Sbostic  *	The Regents of the University of California.  All rights reserved.
448524Sbostic  *
548524Sbostic  * %sccs.include.proprietary.c%
648524Sbostic  */
748524Sbostic 
813348Ssam #ifndef lint
9*61408Sbostic static char sccsid[] = "@(#)label.c	8.1 (Berkeley) 06/04/93";
1048524Sbostic #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 };
label(s)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