MODULE Init;

	IMPORT
		EncStdCodecs, (* EncCodecs.SetDir *)
		HostConsole, (* Console.SetHook *)

		HostFonts (* Fonts.SetHook; required for Texts *),
		HostWindows (* Windows.SetHook *),
		HostDates (* Dates.SetHook *),
		HostDialog (* Dialog.SetShowHook *),
		StdInterpreter, (* Dialog.SetCallHook *)
		StdDialog (* Views.SetViewHook *),

		StdLog, ConsLog, (* Log.Hook *)

		Converters (* .odc *),
		Dialog;

	PROCEDURE Init;
		VAR res: INTEGER;
	BEGIN
		(* StdLog.Open; *)

		Converters.Register("Documents.ImportDocument", "Documents.ExportDocument", "", "odc", {});

		Converters.Register("HostTextConv.ImportText", "HostTextConv.ExportText", "TextViews.View", "txt", {Converters.importAll});
		Converters.Register("HostTextConv.ImportRichText", "HostTextConv.ExportRichText", "TextViews.View", "rtf", {});
		Converters.Register("HostTextConv.ImportUnicode", "HostTextConv.ExportUnicode", "TextViews.View", "utf", {});
		Converters.Register("HostTextConv.ImportDosText", "", "TextViews.View", "txt", {});
		Converters.Register("HostTextConv.ImportHex", "", "TextViews.View", "dat", {Converters.importAll});
		Converters.Register("HostTextConv.ImportText", "HostTextConv.ExportText", "TextViews.View", "xml", {});
		(* Converters.Register("HostTextConv.ImportText", "HostTextConv.ExportText", "TextViews.View", "html", {}); *)
(*
		Converters.Register("DevBrowser.ImportSymFile", "", "TextViews.View", "osf", {});
		Converters.Register("DevBrowser.ImportCodeFile", "", "TextViews.View", "ocf", {});
		Converters.Register("HostBitmaps.ImportBitmap", "HostBitmaps.ExportBitmap", "HostBitmaps.StdView", "bmp", {});
*)
		Converters.Register("StdETHConv.ImportETHDoc", "", "TextViews.View", "eth", {Converters.importAll});
		Converters.Register("", "XhtmlExporter.ExportText", "TextViews.View", "html", {});

		Dialog.Call("ConsInterp.Run", " ", res)
	END Init;

BEGIN
	Init
END Init.
