// Standard result format - "type: name(version)[options]".
// If no version, make it "-"; if no options, use the general options.

includeScript("_init");

function result(bShowType, bShowVersion, bShowOptions) {
    var sResult = "";

    if (bDetected) {
        if (bShowType) {
            sResult += sType + ": ";
        }
        sResult += sName;
        if (bShowVersion) {
            if (sVersion != "") {
                sResult += "(" + sVersion + ")";
            }
        }
        if (bShowOptions) {
            if (sOptions == "") {
                sOptions = File.getGeneralOptions();
            }
            sResult += "[" + sOptions + "]";
        }

        if ((typeof _setResult) == 'function') {
            _setResult(sType, sName, sVersion, sOptions);
        }
    }

    return sResult;
}