#include <stdlib.h>
#include "VTS.h"

void free_all(float **w,
	      float **x,
	      float **y,
	      float **xx,
	      float **xy,
	      float **yy,
	      float **z,
	      float **zv,
	      float *zc,
	      float *pk,
	      float *A,
	      float *B, float *C, float *D, float *E, float *F, float *G)
{
	if (w != NULL)
		free2d((void **) w);
	if (x != NULL)
		free2d((void **) x);
	if (y != NULL)
		free2d((void **) y);
	if (xx != NULL)
		free2d((void **) xx);
	if (xy != NULL)
		free2d((void **) xy);
	if (yy != NULL)
		free2d((void **) yy);
	if (z != NULL)
		free2d((void **) z);
	if (zv != NULL)
		free2d((void **) zv);
	if (zc != NULL)
		free(zc);
	if (pk != NULL)
		free(pk);
	if (A != NULL)
		free(A);
	if (B != NULL)
		free(B);
	if (C != NULL)
		free(C);
	if (D != NULL)
		free(D);
	if (E != NULL)
		free(E);
	if (F != NULL)
		free(F);
	if (G != NULL)
		free(G);
}
