#include "test.h"

int main(int argc, char* argv[])
{
	FILE* input;
	if (! (input = ParseCmdLine(argc, argv)))
	{
		return 0;
	}
	matrix m;
	int row = -1, col = -1;
	int *filled;
	char iDesc[] = "matrix m, int row, int column";
	MemoryManager mem = CreateMemoryManager(5, 1, 0, 0);
	while (ParseStructure(input, iDesc, &filled, &mem, &m, &row, &col))
	{
		filled[1] = 1;
		filled[2] = 1;
		DisplayStructure(iDesc, filled, &m, row, col);
		
		printf("Result: %d\n", gcdv(filled[0] ? &m : 0, row, col));
		printf("-------------------------------------------------------------------------------\n");
		FreeMemory(&mem);
		mem = CreateMemoryManager(5, 1, 0, 0);
		row = -1;
		col = -1;		
	}
	FreeMemory(&mem);
	return 0;
}
