/* ds.c: Data structure routines. * * Written by Daniel Barrett. 100% PUBLIC DOMAIN. */ #include "decl.h" InitPoly(poly, n) /* Initialize the polynomial to all zeroes. */ complex poly[]; int n; { int i; for (i=0; in[REAL] = realPart; comp->n[IMAG] = imagPart; } CopyPoly(poly1, poly2, degree) /* Copy poly1 into poly2. */ complex poly1[], poly2[]; int degree; { int i; for (i=0; i<=degree; i++) CopyComplex(poly1[i], &poly2[i]); } CopyComplex(c1, c2) /* Copy complex number c1 into c2. */ complex c1, *c2; { AssignComplex(c2, c1.n[REAL], c1.n[IMAG]); }