|
|
1.1 root 1: #include "pen.h"
2: pen(s)
3: char *s;
4: {
5: register int i;
6: i = -1;
7: while(*s != NULL){
8: switch(*s){
9: case 'l':
10: if(!strncmp(s, "long", 4))
11: i=3;
12: break;
13: case 'd':
14: if(!strncmp(s,"dotd",4))
15: i=4;
16: else if(!strncmp(s,"dott",4))
17: i=1;
18: else if(!strncmp(s,"dash",4))
19: i=5;
20: else if(!strncmp(s,"dd",2))
21: i=6;
22: break;
23: case 's':
24: if(!strncmp(s,"solid",5))
25: i=0;
26: else if(!strncmp(s,"short",5))
27: i = 2;
28: break;
29: case 'G':
30: e1->pgap = atof(s+1);
31: break;
32: case 'A':
33: e1->pslant = atof(s+1)/RADIANS;
34: break;
35: }
36: while(*s++ != NULL)
37: if(*s == '/'){
38: s++;
39: break;
40: }
41: }
42: if(i == 0)fprintf(pltout,"LT; ");
43: else if(i > 0)
44: fprintf(pltout,"LT%d; ",i);
45: if(i >= 0)
46: e1->pentype = i;
47: ckerr(0);
48: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.