/*                      QBCC Project

This source file is licensed under the GNU Lesser Public Licence which should be 
included with the distribution of this source.

*/
// Initializes & shutdown everything

#include "../include/stdlibh.h"
#include "../include/stringh.h"
#include "../include/file.h"


#define MEM_SIZE	16384

// Files
file_t *Files;

///////////////////
// Initialize Standard Library
int STD_Initialize(void)
{
	// Initialize Memory Block for strings
	if(!AllocateMemBlock(MEM_SIZE))
	{
		// Error
		exit(1);
	}

	// Initialize File System
	if(!InitializeFileSystem())
	{
		
		// Error
		exit(1);
	}
	
	


	return TRUE;
}


///////////////////
// Shutdown Standard Library
int STD_ShutDown(void)
{

	FreeFileSystem();


	FreeMemBlock();		// To be safe, free this last

	return TRUE;
}