1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
4 |
– |
|
5 |
– |
/* Copyright (c) 1989 Regents of the University of California */ |
6 |
– |
|
4 |
|
/* |
5 |
|
* genworm.c - program to generate worms (strings with varying thickness). |
6 |
|
* |
12 |
|
*/ |
13 |
|
|
14 |
|
#include <stdio.h> |
15 |
< |
|
15 |
> |
#include <math.h> |
16 |
|
#include "fvect.h" |
17 |
|
|
18 |
< |
#define XNAME "X_" /* x function name */ |
19 |
< |
#define YNAME "Y_" /* y function name */ |
20 |
< |
#define ZNAME "Z_" /* z function name */ |
21 |
< |
#define RNAME "R_" /* r function name */ |
18 |
> |
#define XNAME "X`SYS`" /* x function name */ |
19 |
> |
#define YNAME "Y`SYS`" /* y function name */ |
20 |
> |
#define ZNAME "Z`SYS`" /* z function name */ |
21 |
> |
#define RNAME "R`SYS`" /* r function name */ |
22 |
|
|
23 |
|
#define PI 3.14159265358979323846 |
24 |
|
|
28 |
– |
#define FTINY 1e-7 |
29 |
– |
|
25 |
|
#define max(a,b) ((a) > (b) ? (a) : (b)) |
26 |
|
|
27 |
|
|
28 |
|
double funvalue(), l_hermite(), l_bezier(), l_bspline(), argument(); |
29 |
+ |
void quit(); |
30 |
|
|
31 |
|
|
32 |
|
main(argc, argv) |
39 |
|
FVECT lastp, p; |
40 |
|
int i, nseg; |
41 |
|
|
42 |
< |
varset("PI", PI, NULL); |
43 |
< |
funset("hermite", 5, l_hermite); |
44 |
< |
funset("bezier", 5, l_bezier); |
45 |
< |
funset("bspline", 5, l_bspline); |
42 |
> |
varset("PI", ':', PI); |
43 |
> |
funset("hermite", 5, ':', l_hermite); |
44 |
> |
funset("bezier", 5, ':', l_bezier); |
45 |
> |
funset("bspline", 5, ':', l_bspline); |
46 |
|
|
47 |
|
if (argc < 8) |
48 |
|
goto userror; |
119 |
|
} |
120 |
|
|
121 |
|
|
122 |
+ |
void |
123 |
|
eputs(msg) |
124 |
|
char *msg; |
125 |
|
{ |
127 |
|
} |
128 |
|
|
129 |
|
|
130 |
+ |
void |
131 |
|
wputs(msg) |
132 |
|
char *msg; |
133 |
|
{ |
135 |
|
} |
136 |
|
|
137 |
|
|
138 |
+ |
void |
139 |
|
quit(code) |
140 |
+ |
int code; |
141 |
|
{ |
142 |
|
exit(code); |
143 |
|
} |