// DIE's signature file
// Author: hypn0 <hypn0@mail.ru>

init("overlay","");

function detect(bShowType,bShowVersion,bShowOptions)
{
    if(MSDOS.compareOverlay("....'-lh'..2d")||MSDOS.compareOverlay("....'-lz'..2d"))
    {
        sName="LHA archive";
        switch(MSDOS.readByte(MSDOS.getOverlayOffset()+0x5))
        {
        case 0x30: bDetected=1; break;
        case 0x31: bDetected=1; break;
        case 0x32: bDetected=1; break;
        case 0x33: bDetected=1; break;
        case 0x34: bDetected=1; break;
        case 0x35: bDetected=1; break;
        case 0x36: bDetected=1; break;
        case 0x64: bDetected=1; break;
        case 0x73: bDetected=1; break;
        }
    }
    else if(MSDOS.compareOverlay("60ea"))
    {
        sName="ARJ archive";
        bDetected=1;
    }
    else if(MSDOS.compareOverlay("'ZOO'............'Archive'"))
    {
        bDetected=1;
        sName="ZOO archive";
    }
    else if(MSDOS.compareOverlay("4c0103"))
    {
        bDetected=1;
        sName="COFF executable";
    }
    else if(MSDOS.compareOverlay("0101'Aladdin'"))
    {
        sName="Self UnStuffit data";
        sVersion="1.1";
        sOptions="by Aladdin Systems, Inc.";
        bDetected=1;
    }
    else if(MSDOS.compareOverlay("7f'ELF'010101"))
    {
        sName="ELF executable";
        bDetected=1;
    }
    else if(MSDOS.compareOverlay("................'BSA'"))
    {
        sName="BSN archive";
        bDetected=1;
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
