Index: MultiSource/Benchmarks/MiBench/automotive-bitcount/conio.h =================================================================== --- MultiSource/Benchmarks/MiBench/automotive-bitcount/conio.h +++ MultiSource/Benchmarks/MiBench/automotive-bitcount/conio.h @@ -16,7 +16,7 @@ #define echo_on() term_option(0) #define echo_off() term_option(1) -int term_option(); -int getch(); +int term_option(int); +int getch(void); #endif /* UNXCONIO__H */ Index: MultiSource/Benchmarks/MiBench/automotive-susan/susan.c =================================================================== --- MultiSource/Benchmarks/MiBench/automotive-susan/susan.c +++ MultiSource/Benchmarks/MiBench/automotive-susan/susan.c @@ -340,8 +340,7 @@ /* {{{ int getint(fp) derived from XV */ -int getint(fd) - FILE *fd; +int getint(FILE *fd) { int c, i; char dummy[10000]; @@ -372,10 +371,7 @@ /* }}} */ -void get_image(filename,in,x_size,y_size) - char filename[200]; - unsigned char **in; - int *x_size, *y_size; +void get_image(char filename[200], unsigned char **in, int *x_size, int *y_size) { FILE *fd; char header [100]; @@ -412,11 +408,7 @@ /* }}} */ /* {{{ put_image(filename,in,x_size,y_size) */ -put_image(filename,in,x_size,y_size) - char filename [100], - *in; - int x_size, - y_size; +put_image(char filename[100], char *in, int x_size, int y_size) { FILE *fd; @@ -440,9 +432,7 @@ /* }}} */ /* {{{ int_to_uchar(r,in,size) */ -int_to_uchar(r,in,size) - uchar *in; - int *r, size; +int_to_uchar(int *r, uchar *in, int size) { int i, max_r=r[0], @@ -467,9 +457,7 @@ /* }}} */ /* {{{ setup_brightness_lut(bp,thresh,form) */ -void setup_brightness_lut(bp,thresh,form) - uchar **bp; - int thresh, form; +void setup_brightness_lut(uchar **bp, int thresh, int form) { int k; float temp; @@ -493,9 +481,7 @@ /* {{{ susan_principle(in,r,bp,max_no,x_size,y_size) */ -susan_principle(in,r,bp,max_no,x_size,y_size) - uchar *in, *bp; - int *r, max_no, x_size, y_size; +susan_principle(uchar *in, int *r, uchar *bp, int max_no, int x_size, int y_size) { int i, j, n; uchar *p,*cp; @@ -567,9 +553,7 @@ /* }}} */ /* {{{ susan_principle_small(in,r,bp,max_no,x_size,y_size) */ -susan_principle_small(in,r,bp,max_no,x_size,y_size) - uchar *in, *bp; - int *r, max_no, x_size, y_size; +susan_principle_small(uchar *in, int *r, uchar *bp, int max_no, int x_size, int y_size) { int i, j, n; uchar *p,*cp; @@ -611,9 +595,7 @@ /* {{{ median(in,i,j,x_size) */ -uchar median(in,i,j,x_size) - uchar *in; - int i, j, x_size; +uchar median(uchar *in, int i, int j, int x_size) { int p[8],k,l,tmp; @@ -641,10 +623,7 @@ /* this enlarges "in" so that borders can be dealt with easily */ -enlarge(in,tmp_image,x_size,y_size,border) - uchar **in; - uchar *tmp_image; - int *x_size, *y_size, border; +enlarge(uchar **in, uchar *tmp_image, int *x_size, int *y_size, int border) { int i, j; @@ -672,10 +651,8 @@ /* }}} */ /* {{{ void susan_smoothing(three_by_three,in,dt,x_size,y_size,bp) */ -void susan_smoothing(three_by_three,in,dt,x_size,y_size,bp) - int three_by_three, x_size, y_size; - uchar *in, *bp; - float dt; +void susan_smoothing(int three_by_three, uchar *in, float dt, int x_size, + int y_size, uchar *bp) { /* {{{ vars */ @@ -813,9 +790,7 @@ /* {{{ edge_draw(in,corner_list,drawing_mode) */ -edge_draw(in,mid,x_size,y_size,drawing_mode) - uchar *in, *mid; - int x_size, y_size, drawing_mode; +edge_draw(uchar *in, uchar *mid, int x_size, int y_size, int drawing_mode) { int i; uchar *inp, *midp; @@ -853,9 +828,7 @@ /* only one pass is needed as i,j are decremented if necessary to go back and do bits again */ -susan_thin(r,mid,x_size,y_size) - uchar *mid; - int *r, x_size, y_size; +susan_thin(int *r, uchar *mid, int x_size, int y_size) { int l[9], centre, nlinks, npieces, b01, b12, b21, b10, @@ -1063,9 +1036,8 @@ /* }}} */ /* {{{ susan_edges(in,r,sf,max_no,out) */ -susan_edges(in,r,mid,bp,max_no,x_size,y_size) - uchar *in, *bp, *mid; - int *r, max_no, x_size, y_size; +susan_edges(uchar *in, int *r, uchar *mid, uchar* bp, int max_no, int x_size, + int y_size) { float z; int do_symmetry, i, j, m, n, a, b, x, y, w; @@ -1300,9 +1272,8 @@ /* }}} */ /* {{{ susan_edges_small(in,r,sf,max_no,out) */ -susan_edges_small(in,r,mid,bp,max_no,x_size,y_size) - uchar *in, *bp, *mid; - int *r, max_no, x_size, y_size; +susan_edges_small(uchar *in, int *r, uchar *mid, uchar* bp, int max_no, + int x_size, int y_size) { float z; int do_symmetry, i, j, m, n, a, b, x, y, w; @@ -1433,10 +1404,7 @@ /* {{{ corner_draw(in,corner_list,drawing_mode) */ -corner_draw(in,corner_list,x_size,drawing_mode) - uchar *in; - CORNER_LIST corner_list; - int x_size, drawing_mode; +corner_draw(uchar *in, CORNER_LIST corner_list, int x_size, int drawing_mode) { uchar *p; int n=0; @@ -1463,10 +1431,8 @@ /* }}} */ /* {{{ susan(in,r,sf,max_no,corner_list) */ -susan_corners(in,r,bp,max_no,corner_list,x_size,y_size) - uchar *in, *bp; - int *r, max_no, x_size, y_size; - CORNER_LIST corner_list; +susan_corners(uchar *in, int *r, uchar *bp, int max_no, CORNER_LIST corner_list, + int x_size, int y_size) { int n,x,y,sq,xx,yy, i,j,*cgx,*cgy; @@ -1746,10 +1712,8 @@ /* }}} */ /* {{{ susan_quick(in,r,sf,max_no,corner_list) */ -susan_corners_quick(in,r,bp,max_no,corner_list,x_size,y_size) - uchar *in, *bp; - int *r, max_no, x_size, y_size; - CORNER_LIST corner_list; +susan_corners_quick(uchar *in, int *r, uchar *bp, int max_no, + CORNER_LIST corner_list, int x_size, int y_size) { int n,x,y,i,j; uchar *p,*cp; Index: MultiSource/Benchmarks/MiBench/consumer-lame/lame.c =================================================================== --- MultiSource/Benchmarks/MiBench/consumer-lame/lame.c +++ MultiSource/Benchmarks/MiBench/consumer-lame/lame.c @@ -1194,6 +1194,8 @@ #ifdef __FreeBSD__ # include +fp_except_t fpgetmask(void); +fp_except_t fpsetmask(fp_except_t); #endif Index: MultiSource/Benchmarks/MiBench/consumer-typeset/externs.h =================================================================== --- MultiSource/Benchmarks/MiBench/consumer-typeset/externs.h +++ MultiSource/Benchmarks/MiBench/consumer-typeset/externs.h @@ -1911,7 +1911,7 @@ FULL_LENGTH urx, FULL_LENGTH ury); void (*LinkDest)(OBJECT name, FULL_LENGTH llx, FULL_LENGTH lly, FULL_LENGTH urx, FULL_LENGTH ury); - void (*LinkCheck)(); + void (*LinkCheck)(void); } *BACK_END; @@ -3251,7 +3251,7 @@ extern MAPPING MapLoad(OBJECT filename, BOOLEAN recoded); extern FULL_CHAR MapCharEncoding(FULL_CHAR *str, MAPPING m); extern FULL_CHAR *MapEncodingName(MAPPING m); -extern void MapPrintEncodings(); +extern void MapPrintEncodings(void); extern void MapEnsurePrinted(MAPPING m, int curr_page); extern void MapPrintPSResources(FILE *fp); extern OBJECT MapSmallCaps(OBJECT x, STYLE *style); Index: MultiSource/Benchmarks/MiBench/office-ispell/CMakeLists.txt =================================================================== --- MultiSource/Benchmarks/MiBench/office-ispell/CMakeLists.txt +++ MultiSource/Benchmarks/MiBench/office-ispell/CMakeLists.txt @@ -1,5 +1,6 @@ set(PROG office-ispell) list(APPEND CPPFLAGS -Dconst=) +list(APPEND CPPFLAGS -DGENERATE_LIBRARY_PROTOS=1) list(APPEND LDFLAGS -lm) set(RUN_OPTIONS -a -d ${CMAKE_CURRENT_SOURCE_DIR}/americanmed+) set(STDIN_FILENAME ${CMAKE_CURRENT_SOURCE_DIR}/large.txt) Index: MultiSource/Benchmarks/MiBench/office-ispell/term.c =================================================================== --- MultiSource/Benchmarks/MiBench/office-ispell/term.c +++ MultiSource/Benchmarks/MiBench/office-ispell/term.c @@ -71,6 +71,8 @@ #include "proto.h" #include "msgs.h" #include +#include +#include #if defined(__GLIBC__) || defined(__FreeBSD__) || defined(__APPLE__) /* Use termios under at least glibc */ @@ -177,12 +179,12 @@ #endif #endif static int termchanged = 0; -static SIGNAL_TYPE (*oldint) (); -static SIGNAL_TYPE (*oldterm) (); +static SIGNAL_TYPE (*oldint) (int); +static SIGNAL_TYPE (*oldterm) (int); #ifdef SIGTSTP -static SIGNAL_TYPE (*oldttin) (); -static SIGNAL_TYPE (*oldttou) (); -static SIGNAL_TYPE (*oldtstp) (); +static SIGNAL_TYPE (*oldttin) (int); +static SIGNAL_TYPE (*oldttou) (int); +static SIGNAL_TYPE (*oldtstp) (int); #endif void terminit () Index: MultiSource/Benchmarks/MiBench/security-blowfish/bftest.c =================================================================== --- MultiSource/Benchmarks/MiBench/security-blowfish/bftest.c +++ MultiSource/Benchmarks/MiBench/security-blowfish/bftest.c @@ -64,7 +64,7 @@ #include #include "blowfish.h" -int test(); +int test(void); char *bf_key[2]={ "abcdefghijklmnopqrstuvwxyz", Index: MultiSource/Benchmarks/MiBench/telecomm-gsm/toast.h =================================================================== --- MultiSource/Benchmarks/MiBench/telecomm-gsm/toast.h +++ MultiSource/Benchmarks/MiBench/telecomm-gsm/toast.h @@ -19,7 +19,7 @@ #include #include -#ifndef HAS_ERRNO_DECL +#if !defined(errno) && !defined(HAS_ERRNO_DECL) extern int errno; #endif Index: MultiSource/Benchmarks/MiBench/telecomm-gsm/toast.c =================================================================== --- MultiSource/Benchmarks/MiBench/telecomm-gsm/toast.c +++ MultiSource/Benchmarks/MiBench/telecomm-gsm/toast.c @@ -210,7 +210,7 @@ } -static void catch_signals P1((fun), SIGHANDLER_T (*fun) ()) +static void catch_signals P1((fun), SIGHANDLER_T (*fun) (int)) { #ifdef SIGHUP signal( SIGHUP, fun ); Index: MultiSource/Benchmarks/Olden/bh/defs.h =================================================================== --- MultiSource/Benchmarks/Olden/bh/defs.h +++ MultiSource/Benchmarks/Olden/bh/defs.h @@ -27,8 +27,6 @@ #include "vectmath.h" #define MAX_NUM_NODES 64 -extern double fabs(); - /* * BODY and CELL data structures are used to represent the tree: Index: MultiSource/Benchmarks/Olden/bh/newbh.c =================================================================== --- MultiSource/Benchmarks/Olden/bh/newbh.c +++ MultiSource/Benchmarks/Olden/bh/newbh.c @@ -15,8 +15,8 @@ int nbody; -double sqrt(), xrand(), my_rand(); -real pow(); +double xrand(double xl, double xh, double r); +double my_rand(double seed); extern icstruct intcoord(bodyptr p, treeptr t); extern int BhDebug; @@ -35,10 +35,10 @@ } datapoints; -bodyptr testdata(); +bodyptr testdata(void); datapoints uniform_testdata(int proc, int nbody, int seedfactor); void stepsystem(treeptr t, int nstep); -treeptr old_main(); +treeptr old_main(void); void my_free(nodeptr n); bodyptr ubody_alloc(int p); bodyptr movebodies(bodyptr list, int proc); @@ -46,8 +46,8 @@ void freetree1(nodeptr n); int old_subindex(icstruct ic, int l); -int dealwithargs(); -int error(); +int dealwithargs(int, char**); +int error(const char*); int arg1; @@ -66,7 +66,7 @@ /* global! */ /* Main routine from original program */ -treeptr old_main() { +treeptr old_main(void) { real tnow; real tout; int i, nsteps, nprocs; @@ -191,7 +191,7 @@ #define MFRAC 0.999 /* mass cut off at MFRAC of total */ /* don't use this unless it is fixed on random numbers, &c */ -bodyptr testdata() +bodyptr testdata(void) { real rsc, vsc, r, v, x, y; vector cmr, cmv; @@ -750,8 +750,6 @@ * It's free because it's yours. */ -double ceil(); - bodyptr body_alloc(int p, real p0, real p1, real p2, real v0, real v1, real v2, real a0, real a1, real a2, real mass, bodyptr ob); bodyptr ubody_alloc(int p); cellptr cell_alloc(int p); @@ -936,7 +934,7 @@ /* called from expandbox */ icstruct intcoord1(double rp0, double rp1, double rp2, treeptr t) { - double xsc, floor(); + double xsc; /*double rmin,rsize;*/ icstruct ic; @@ -985,7 +983,6 @@ icstruct intcoord(bodyptr p, treeptr t) { register double xsc; - double floor(); icstruct ic; register real rsize; vector pos; @@ -1034,7 +1031,7 @@ int ic_test(bodyptr p, treeptr t) { - double xsc, rsize, floor(); + double xsc, rsize; int result; vector pos; @@ -1083,7 +1080,7 @@ { register int i, k; register real rsize; - double xsc, floor(); + double xsc; int xp[NDIM]; vector pos; Index: MultiSource/Benchmarks/Olden/bh/stdinc.h =================================================================== --- MultiSource/Benchmarks/Olden/bh/stdinc.h +++ MultiSource/Benchmarks/Olden/bh/stdinc.h @@ -78,14 +78,6 @@ #define void int #endif -/* - * PROC, IPROC, RPROC: pointers to procedures, integer functions, and - * real-valued functions, respectively. - */ - -typedef void (*proc)(); -typedef int (*iproc)(); -typedef real (*rproc)(); /* * PRIVATE: declare something to be local to a file. Index: MultiSource/Benchmarks/Olden/bh/util.c =================================================================== --- MultiSource/Benchmarks/Olden/bh/util.c +++ MultiSource/Benchmarks/Olden/bh/util.c @@ -19,8 +19,7 @@ */ double my_rand(double seed) { - double t = A*seed + 1; - double floor(); + double t = A*seed + 1; seed = t - (M * floor(t / M)); Index: MultiSource/Benchmarks/Olden/bisort/proc.h =================================================================== --- MultiSource/Benchmarks/Olden/bisort/proc.h +++ MultiSource/Benchmarks/Olden/bisort/proc.h @@ -3,11 +3,11 @@ /* ========== PROCEDURE TYPES/NUMS ================== */ -HANDLE *RandTree(); +HANDLE *RandTree(int n, int seed, int node, int level); -void SwapValue(); -void SwapValLeft(); -void SwapValRight(); -int Bimerge(); -int Bisort(); +void SwapValue(HANDLE *l, HANDLE *r); +void SwapValLeft(HANDLE *l, HANDLE *r, HANDLE *ll, HANDLE *rl, int lval, int rval); +void SwapValRight(HANDLE *l, HANDLE *r, HANDLE *ll, HANDLE *rl, int lval, int rval); +int Bimerge(HANDLE *root, int spr_val, int dir); +int Bisort(HANDLE *root, int spr_val, int dir); int dealwithargs(int argc, char *argv[]); Index: MultiSource/Benchmarks/Olden/em3d/make_graph.h =================================================================== --- MultiSource/Benchmarks/Olden/em3d/make_graph.h +++ MultiSource/Benchmarks/Olden/em3d/make_graph.h @@ -10,4 +10,4 @@ /* initialize graph returns a structure with pointers to lists of e and h * nodes. */ -graph_t *initialize_graph(); +graph_t *initialize_graph(void); Index: MultiSource/Benchmarks/Olden/em3d/make_graph.c =================================================================== --- MultiSource/Benchmarks/Olden/em3d/make_graph.c +++ MultiSource/Benchmarks/Olden/em3d/make_graph.c @@ -278,7 +278,7 @@ } } -graph_t *initialize_graph() { +graph_t *initialize_graph(void) { table_t *table; graph_t *retval; int i,j,blocksize; Index: MultiSource/Benchmarks/Olden/em3d/util.h =================================================================== --- MultiSource/Benchmarks/Olden/em3d/util.h +++ MultiSource/Benchmarks/Olden/em3d/util.h @@ -19,7 +19,7 @@ int gen_signed_number(int range); /* Generate a double from 0.0 to 1.0 */ -double gen_uniform_double(); +double gen_uniform_double(void); /* Return 1, percent percent of the time and 0 otherwise */ int check_percent(int percent); Index: MultiSource/Benchmarks/Olden/em3d/util.c =================================================================== --- MultiSource/Benchmarks/Olden/em3d/util.c +++ MultiSource/Benchmarks/Olden/em3d/util.c @@ -12,7 +12,7 @@ #define lrand48() (rand() << 16 | rand()) #define drand48() (1.0*rand() / RAND_MAX) #else -extern double drand48(); +extern double drand48(void); #endif static int percentcheck=0,numlocal=0; Index: MultiSource/Benchmarks/Olden/power/compute.c =================================================================== --- MultiSource/Benchmarks/Olden/power/compute.c +++ MultiSource/Benchmarks/Olden/power/compute.c @@ -24,8 +24,8 @@ /* Leaf optimization procedures */ void optimize_node (double pi_R, double pi_I); -double find_g (); -double find_h (); +double find_g (void); +double find_h (void); double find_gradient_f (double pi_R, double pi_I, double* gradient); double find_gradient_g (double* gradient); double find_gradient_h (double* gradient); Index: MultiSource/Benchmarks/Olden/power/power.h =================================================================== --- MultiSource/Benchmarks/Olden/power/power.h +++ MultiSource/Benchmarks/Olden/power/power.h @@ -87,7 +87,7 @@ Root build_tree(void); Lateral build_lateral(int i, int num); Branch build_branch(int i, int j, int num); -Leaf build_leaf(); +Leaf build_leaf(void); void Compute_Tree(Root r); Demand Compute_Lateral(Lateral l, double theta_R, double theta_I, Index: MultiSource/Benchmarks/Olden/voronoi/defines.h =================================================================== --- MultiSource/Benchmarks/Olden/voronoi/defines.h +++ MultiSource/Benchmarks/Olden/voronoi/defines.h @@ -76,21 +76,21 @@ #define rotinv(a) ((QUAD_EDGE) ( (((uptrint) (a) + 3*SIZE) & ANDF) | ((uptrint) (a) & ~ANDF) )) #define base(a) ((QUAD_EDGE) ((uptrint a) & ~ANDF)) -QUAD_EDGE alloc_edge(); +QUAD_EDGE alloc_edge(void); void free_edge(QUAD_EDGE e); -QUAD_EDGE makeedge(); -void splice(); -void swapedge(); -void deleteedge(); -QUAD_EDGE build_delaunay_triangulation(); +QUAD_EDGE makeedge(VERTEX_PTR origin, VERTEX_PTR destination); +void splice(QUAD_EDGE, QUAD_EDGE); +void swapedge(QUAD_EDGE); +void deleteedge(QUAD_EDGE); +QUAD_EDGE build_delaunay_triangulation(VERTEX_PTR tree, VERTEX_PTR extra); EDGE_PAIR build_delaunay(VERTEX_PTR tree, VERTEX_PTR extra); EDGE_PAIR do_merge(QUAD_EDGE ldo, QUAD_EDGE ldi, QUAD_EDGE rdi, QUAD_EDGE rdo); -QUAD_EDGE connect_left(); -QUAD_EDGE connect_right(); +QUAD_EDGE connect_left(QUAD_EDGE a, QUAD_EDGE b); +QUAD_EDGE connect_right(QUAD_EDGE a, QUAD_EDGE b); int myrandom(int seed); -void zero_seen(); -QUAD_EDGE pop_edge(); +void zero_seen(struct EDGE_STACK *my_stack, QUAD_EDGE edge); +QUAD_EDGE pop_edge(struct EDGE_STACK *x); #define drand(seed) (((double) (seed=myrandom(seed))) / (double) 2147483647) Index: MultiSource/Benchmarks/Olden/voronoi/newvor.c =================================================================== --- MultiSource/Benchmarks/Olden/voronoi/newvor.c +++ MultiSource/Benchmarks/Olden/voronoi/newvor.c @@ -86,8 +86,7 @@ return retval.left; } -VERTEX_PTR get_low(tree) - register VERTEX_PTR tree; +VERTEX_PTR get_low(VERTEX_PTR tree) { register VERTEX_PTR temp; while((temp=tree->left)) tree=temp; /* 3% load penalty */ @@ -223,9 +222,8 @@ /* Geometric primitives */ /****************************************************************/ -BOOLEAN incircle(a,b,c,d) +BOOLEAN incircle(VERTEX_PTR a, VERTEX_PTR b, VERTEX_PTR c, VERTEX_PTR d) /* incircle, as in the Guibas-Stolfi paper. */ - VERTEX_PTR a,b,c,d; { double adx, ady, bdx, bdy, cdx, cdy, dx, dy, anorm, bnorm, cnorm, dnorm; double dret ; @@ -269,8 +267,7 @@ /****************************************************************/ /* Quad-edge manipulation primitives */ /****************************************************************/ -QUAD_EDGE makeedge(origin, destination) -VERTEX_PTR origin, destination; +QUAD_EDGE makeedge(VERTEX_PTR origin, VERTEX_PTR destination) { register QUAD_EDGE temp, ans; temp = alloc_edge(); @@ -346,8 +343,7 @@ /****************************************************************/ /*#define valid(l) ccw(orig(basel), dest(l), dest(basel))*/ -int valid(l,basel) - QUAD_EDGE l,basel; +int valid(QUAD_EDGE l, QUAD_EDGE basel) { register VERTEX_PTR t1,t2,t3; @@ -360,8 +356,7 @@ return ccw(t1,t2,t3); } -void dump_quad(ptr) - QUAD_EDGE ptr; +void dump_quad(QUAD_EDGE ptr) { int i; QUAD_EDGE j; @@ -531,8 +526,7 @@ int loop = 0, randum = 1, filein = 0 , fileout = 1, statistics = 0; -void in_order(tree) - VERTEX_PTR tree; +void in_order(VERTEX_PTR tree) { VERTEX_PTR tleft, tright; double x, y; @@ -625,9 +619,7 @@ return my_stack; } -void free_all(cont,my_stack) - int cont; - struct EDGE_STACK *my_stack; +void free_all(int cont, struct EDGE_STACK *my_stack) { free(my_stack->elts); free(my_stack); @@ -711,9 +703,7 @@ } } -void push_nonzero_ring(stack, edge) - struct EDGE_STACK *stack; - QUAD_EDGE edge; +void push_nonzero_ring(struct EDGE_STACK *stack, QUAD_EDGE edge) { QUAD_EDGE nex; nex = onext(edge); Index: MultiSource/Benchmarks/Olden/voronoi/output.c =================================================================== --- MultiSource/Benchmarks/Olden/voronoi/output.c +++ MultiSource/Benchmarks/Olden/voronoi/output.c @@ -3,20 +3,19 @@ #include "defines.h" #include -extern struct VEC2 V2_sum(); -extern struct VEC2 V2_sub(); -extern struct VEC2 V2_times(); -extern double V2_cprod(); -extern struct VEC2 V2_cross(); -extern double V2_dot(); -extern double V2_magn(); +extern struct VEC2 V2_sum(struct VEC2 u, struct VEC2 v); +extern struct VEC2 V2_sub(struct VEC2 u, struct VEC2 v); +extern struct VEC2 V2_times(double c, struct VEC2 v); +extern double V2_cprod(struct VEC2 u, struct VEC2 v); +extern struct VEC2 V2_cross(struct VEC2 v); +extern double V2_dot(struct VEC2 u, struct VEC2 v); +extern double V2_magn(struct VEC2 u); /****************************************************************/ /* Voronoi Output Routines */ /****************************************************************/ -void plot_dedge(p1, p2) -VERTEX_PTR p1, p2; +void plot_dedge(VERTEX_PTR p1, VERTEX_PTR p2) { double x1,x2,y1,y2; @@ -29,8 +28,7 @@ (float) x2, (float) y2); } -void plot_vedge(p1, p2) - struct VEC2 p1, p2; +void plot_vedge(struct VEC2 p1, struct VEC2 p2) { /* plots a Voronoi-diagram edge on your favorite device. */