16 |
|
|
17 |
|
#include <stdio.h> |
18 |
|
|
19 |
< |
#define ZNAME "Z_" /* z function name */ |
20 |
< |
#define RNAME "R_" /* r function name */ |
19 |
> |
#define ZNAME "Z`SYS`" /* z function name */ |
20 |
> |
#define RNAME "R`SYS`" /* r function name */ |
21 |
|
|
22 |
|
#define PI 3.14159265358979323846 |
23 |
|
|
44 |
|
int i, nseg; |
45 |
|
int orient; |
46 |
|
|
47 |
< |
varset("PI", PI); |
48 |
< |
funset("hermite", 5, l_hermite); |
49 |
< |
funset("bezier", 5, l_bezier); |
50 |
< |
funset("bspline", 5, l_bspline); |
47 |
> |
varset("PI", ':', PI); |
48 |
> |
funset("hermite", 5, ':', l_hermite); |
49 |
> |
funset("bezier", 5, ':', l_bezier); |
50 |
> |
funset("bspline", 5, ':', l_bspline); |
51 |
|
|
52 |
|
if (argc < 6) |
53 |
|
goto userror; |
54 |
|
|
55 |
|
for (i = 6; i < argc; i++) |
56 |
|
if (!strcmp(argv[i], "-e")) |
57 |
< |
scompile(NULL, argv[++i]); |
57 |
> |
scompile(argv[++i], NULL, 0); |
58 |
|
else if (!strcmp(argv[i], "-f")) |
59 |
|
fcompile(argv[++i]); |
60 |
|
else if (!strcmp(argv[i], "-s")) |
63 |
|
goto userror; |
64 |
|
|
65 |
|
sprintf(stmp, "%s(t)=%s;", ZNAME, argv[3]); |
66 |
< |
scompile(NULL, stmp); |
66 |
> |
scompile(stmp, NULL, 0); |
67 |
|
sprintf(stmp, "%s(t)=%s;", RNAME, argv[4]); |
68 |
< |
scompile(NULL, stmp); |
68 |
> |
scompile(stmp, NULL, 0); |
69 |
|
nseg = atoi(argv[5]); |
70 |
|
if (nseg <= 0) |
71 |
|
goto userror; |