Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/cmd/tex/tpic/libtex/pen.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include "tex.h"
pen(s) 
char	*s; 
{
	double dlen;

	while (*s != NULL) {
		switch (*s) {
		case 'd':
			if (!(strncmp(s, "dash", 4))) 
				e1->pen = DASHPEN;
			else if (!(strncmp(s, "dot", 3)))
				e1->pen = DOTPEN;
			else
				break;
			while (*s && *s!=' ')
				s++;
			if (sscanf(s, "%f, &dlen)==1 && dlen > 0)
				e1->dashlen = dlen;
			break;
		case 's':
			if (!(strncmp(s, "solid", 5))) 
				e1->pen = SOLIDPEN;
			break;
		}
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.