
#include "FreeTypeError.h"

#include <ft2build.h>

#undef __FTERRORS_H__
#define FT_ERROR_START_LIST		{
#define FT_ERRORDEF(e, v ,s)		{ e, s },
#define FT_ERROR_END_LIST		{ 0, NULL } };

const struct error_list {
	int		code;
	const char*	msg;
} ft_errors[] = 
#include FT_ERRORS_H

const char* FT_GetErrorString(FT_Error error) {

	const struct error_list* ptr = ft_errors;

	while(ptr->msg) {

		if (ptr->code == error)
			return ptr->msg;
		ptr++;
	}
	return "Unkown error";
}
