#include <stdio.h>
#include <exec/types.h>

struct Library *LangModBase;

#include "langmod_protos.h"
#include "langmod_pragmas.h"
#include "langmod.h"

/* Should read:
	"Nearly five and twenty to four (am)"
	"Thursday 12th December 1996"
*/

/* test result ok! */

struct EngTime etime ={
	3,0,34,1996,12,12,4
};

void main(int argc, char **argv) {
	char name[100];
	char buffer[200], buffer2[200];
	ULONG error;

	sprintf(name,"%s.langmod",argv[1]);

	if(!(LangModBase=OpenLibrary(name,0))) {
		printf("Unsupported language!\n");
		return;
	}
	
	printf("Time: %s\n",ECM_GetTimeStr((UBYTE *)&buffer[0],199,&error,&etime));
	if(error==ERR_BUFSIZE) 
		printf("Buffer size (time) was not big enough!\n");

	printf("Date: %s\n",ECM_GetDateStr((UBYTE *)&buffer2[0],199,&error,&etime));
	if(error==ERR_BUFSIZE) 
		printf("Buffer size (date) was not big enough!\n");
	
	end:
	CloseLibrary(LangModBase);
}