File:  [Research Unix] / researchv10no / libplot / libpen / pen.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

#include "pen.h"
pen(s)
char *s;
{
	register int i;
	i = -1;
	while(*s != NULL){
		switch(*s){
		case 'l':
			if(!strncmp(s, "long", 4))
				i=3;
			break;
		case 'd':
			if(!strncmp(s,"dotd",4))
				i=4;
			else if(!strncmp(s,"dott",4))
				i=1;
			else if(!strncmp(s,"dash",4))
				i=5;
			else if(!strncmp(s,"dd",2))
				i=6;
			break;
		case 's':
			if(!strncmp(s,"solid",5))
				i=0;
			else if(!strncmp(s,"short",5))
				i = 2;
			break;
		case 'G':
			e1->pgap = atof(s+1);
			break;
		case 'A':
			e1->pslant = atof(s+1)/RADIANS;
			break;
		}
		while(*s++ != NULL)
			if(*s == '/'){
				s++;
				break;
			}
	}
	if(i == 0)fprintf(pltout,"LT; ");
	else if(i > 0)
		fprintf(pltout,"LT%d; ",i);
	if(i >= 0)
		e1->pentype = i;
	ckerr(0);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.