#include "test.h"

int main(int argc, char* argv[])
{
	FILE* input;
	if (! (input = ParseCmdLine(argc, argv)))
	{
		return 0;
	}
	matrix A, result;
	int row = -1, col = -1;
	int *filled;
	char iDesc[] = "matrix A";
	MemoryManager mem = CreateMemoryManager(5, 1, 0, 0);
	while (ParseStructure(input, iDesc, &filled, &mem, &A))
	{		
		if (filled[0])
		{
			ShowMatrix(&A, "A");
			
			result = invar(&A);
			ManageMatrix(&mem, &result);
			ShowMatrix(&result, "Result:");
		}
		else
		{
			printf("No matrix given. Ignoring problem.\n");
		}
		
		printf("-------------------------------------------------------------------------------\n");
		FreeMemory(&mem);
		mem = CreateMemoryManager(5, 1, 0, 0);
		row = -1;
		col = -1;		
	}
	FreeMemory(&mem);
	return 0;
}
