Run <Obey$Dir>.!Boot

| Define this alias for clarity
| Syntax: BogofilterRMLoad <Path to module>
Set Alias$BogofilterRMLoad IfThere %%*0 Then RMLoad %%*0

| Ensure SharedUnixLibrary is installed
| http://gccsdk.riscos.info/downloads/sharedunixlib/system.zip
RMEnsure SharedUnixLibrary 1.07 BogofilterRMLoad System:Modules.SharedULib
RMEnsure SharedUnixLibrary 1.07 Error Bogofilter requires SharedUnixLibrary 1.07 or later. This can be downloaded from http://gccsdk.riscos.info/downloads/sharedunixlib/system.zip

| Ensure Iconv
| http://moose.mine.nu:6888/iconv_latest.zip
|
| If Iconv is present, then ensure that the !Unicode resource has been
| seen before loading Iconv. If it isn't present, don't bother checking
| as we don't care.
| Not an error if not present - there'll be no charset conversion.
Set Bogofilter$LoadIconv 0
RMEnsure Iconv 0.04 IfThere System:Modules.Iconv Then Set Bogofilter$LoadIconv 1
If "<Bogofilter$LoadIconv>" = "1" AND "<Unicode$Path>" = "" Then Error Bogofilter requires the !Unicode resource. This can be found, along with the Iconv module, at http://moose.mine.nu:6888/iconv_latest.zip
If "<Bogofilter$LoadIconv>" = "1" Then BogofilterRMLoad System:Modules.Iconv
Unset Bogofilter$LoadIconv

| No longer need this alias
Unset Alias$BogofilterRMLoad

WimpSlot -min 64k -max 64k
Run <Bogofilter$Dir>.!RunImage
