--- ray/src/gen/genworm.c 1990/07/20 14:36:02 1.6 +++ ray/src/gen/genworm.c 2003/02/22 02:07:23 2.4 @@ -1,9 +1,6 @@ #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: genworm.c,v 2.4 2003/02/22 02:07:23 greg Exp $"; #endif - -/* Copyright (c) 1989 Regents of the University of California */ - /* * genworm.c - program to generate worms (strings with varying thickness). * @@ -15,22 +12,21 @@ static char SCCSid[] = "$SunId$ LBL"; */ #include - +#include #include "fvect.h" -#define XNAME "X_" /* x function name */ -#define YNAME "Y_" /* y function name */ -#define ZNAME "Z_" /* z function name */ -#define RNAME "R_" /* r function name */ +#define XNAME "X`SYS`" /* x function name */ +#define YNAME "Y`SYS`" /* y function name */ +#define ZNAME "Z`SYS`" /* z function name */ +#define RNAME "R`SYS`" /* r function name */ #define PI 3.14159265358979323846 -#define FTINY 1e-7 - #define max(a,b) ((a) > (b) ? (a) : (b)) double funvalue(), l_hermite(), l_bezier(), l_bspline(), argument(); +void quit(); main(argc, argv) @@ -43,10 +39,10 @@ char *argv[]; FVECT lastp, p; int i, nseg; - varset("PI", PI, NULL); - funset("hermite", 5, l_hermite); - funset("bezier", 5, l_bezier); - funset("bspline", 5, l_bspline); + varset("PI", ':', PI); + funset("hermite", 5, ':', l_hermite); + funset("bezier", 5, ':', l_bezier); + funset("bspline", 5, ':', l_bspline); if (argc < 8) goto userror; @@ -123,6 +119,7 @@ userror: } +void eputs(msg) char *msg; { @@ -130,6 +127,7 @@ char *msg; } +void wputs(msg) char *msg; { @@ -137,7 +135,9 @@ char *msg; } +void quit(code) +int code; { exit(code); }