Repository: NationalSecurityAgency/ghidra
File: Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/ne/InformationBlock.java (Java)

Code before:
    ////////////////////////////////////////////////////////////////////

    /**
     * Returns a string represention of the target operating system.
     * @return a string represention of the target operating system
     */
    public String getTargetOpSysAsString() {
        switch (ne_exetyp) {
            case EXETYPE_UNKNOWN: return "Unknown";
            case EXETYPE_OS2: return "OS/2";
            case EXETYPE_WINDOWS: return "Windows";
            //case EXETYPE_EUROPEAN_DOS_4: return "European DOS 4.x";
            case EXETYPE_RESERVED4: return "Reserved 4";
            case EXETYPE_WINDOWS_386: return "Windows 386";
            case EXETYPE_BOSS: return "Borland Operating System Services";
            case EXETYPE_PHARLAP_286_OS2: return "Pharlap 286 OS/2";
            case EXETYPE_PHARLAP_286_WIN: return "Pharlap 286 Windows";
        }
        return null;
    }
    /**
     * Returns a string represention of the application flags.
     * @return a string represention of the application flags
     */
    public String getApplicationFlagsAsString() {
        StringBuffer buffer = new StringBuffer();
        if ((ne_flags_app & FLAGS_APP_FULL_SCREEN) != 0) {
            buffer.append(TAB+"Full Screen"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_LIBRARY_MODULE) != 0) {
            buffer.append(TAB+"Library Module"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_LINK_ERRS) != 0) {
            buffer.append(TAB+"Link Errors"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_LOAD_CODE) != 0) {
            buffer.append(TAB+"Load Code"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_NONCONFORMING_PROG) != 0) {
            buffer.append(TAB+"Nonconforming"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_OS2) != 0) {
            buffer.append(TAB+"OS/2"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_WINDOWS_PM) != 0) {
            buffer.append(TAB+"Windows P.M. API"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_WIN_PM_COMPATIBLE) != 0) {
            buffer.append(TAB+"Windows P.M. API Compatible"+"\n");
        }
        return buffer.toString();

Review comment (bug):
Are you not getting a compilation error here?

`Type mismatch: cannot convert from int to byte`

Code after:

    /**
     * Returns a string represention of the target operating system.
     * @return a string represention of the target operating system
     */
    public String getTargetOpSysAsString() {
        switch (ne_exetyp) {
            case EXETYPE_UNKNOWN: return "Unknown";
            case EXETYPE_OS2: return "OS/2";
            case EXETYPE_WINDOWS: return "Windows";
            //case EXETYPE_EUROPEAN_DOS_4: return "European DOS 4.x";
            case EXETYPE_RESERVED4: return "Reserved 4";
            case EXETYPE_WINDOWS_386: return "Windows 386";
            case EXETYPE_BOSS: return "Borland Operating System Services";
            case EXETYPE_PHARLAP_286_OS2: return "Pharlap 286 OS/2";
            case EXETYPE_PHARLAP_286_WIN: return "Pharlap 286 Windows";
        }
        return null;
    }
    /**
     * Returns a string represention of the application flags.
     * @return a string represention of the application flags
     */
    public String getApplicationFlagsAsString() {
        StringBuffer buffer = new StringBuffer();
        byte application_type = ne_flags_app & 0x03;
        if (application_type == FLAGS_APP_FULL_SCREEN) {
            buffer.append(TAB+"Full Screen"+"\n");
        } else if (application_type == FLAGS_APP_WIN_PM_COMPATIBLE) {
            buffer.append(TAB+"Windows P.M. API Compatible"+"\n");
        } else if (application_type == FLAGS_APP_WINDOWS_PM) {
            buffer.append(TAB+"Windows P.M. API"+"\n");
        }

        if ((ne_flags_app & FLAGS_APP_LIBRARY_MODULE) != 0) {
            buffer.append(TAB+"Library Module"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_LINK_ERRS) != 0) {
            buffer.append(TAB+"Link Errors"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_LOAD_CODE) != 0) {
            buffer.append(TAB+"Load Code"+"\n");
        }
        if ((ne_flags_app & FLAGS_APP_NONCONFORMING_PROG) != 0) {
            buffer.append(TAB+"Nonconforming"+"\n");
        }
        return buffer.toString();
    }
    /**
     * Returns a string represention of the program flags.
     * @return a string represention of the program flags